Copyright: Copyright © Corel Corporation Limited. 1996, 1997.   Friday, August 08, 1997 09:33:10. All Rights Reserved.


Quattro Pro Help
Corel Quattro Pro Help

Click the Help Topics button to return to the list of topics.


{Blank Line}
{  }

{  } does nothing; use it to reserve space or insert blank lines in the macro without stopping it. Corel Quattro Pro continues running the macro command following {  }.

See { ; } and {STEPON} for examples.

Related Topics


{;}

Syntax

{;String}

String	=	numbers or letters up to 1020

{ ; } lets you add explanatory remarks or comments to a macro. When Corel Quattro Pro encounters this macro command, it skips over it.

{ ; } is a convenient way to temporarily hide other macro commands, such as a branch to an incomplete macro.

Example

This example runs the _int_update subroutine, which calculates interest to date, then branches to the_print_inv subroutine to print the invoice. Notice how the comments embedded in the macro help make it easier to follow.

{; calculate interest to date}

{_int_update}

{  }

{; print the invoice}

{BRANCH _print_inv}

Related Topics


{ ? }

{ ? } pauses macro execution and lets macro users press function keys, access menus, and choose commands until Enter is pressed. At that point the macro resumes execution.

Since this command gives users complete program control, use it with caution.

You must append a {CR} or ~ command after the { ? } to complete any user entry that requires Enter. For example, if the macro { ? } was used, and the user typed 67 then pressed Enter, the value would remain on the input line at the top of the application window even though the macro resumes. {CR} or ~ (or pressing Enter again) would then enter 67 into the cell.

Example

This macro selects cell E15, enters the label Check Number? in the cell to act as a prompt, then passes control to the keyboard so the user can enter a check number. The information the user enters replaces the Check Number? prompt.

{EditGoto E15}

{PUTCELL "Check Number?"}

{?}~

Related Topics


{ABS}

Syntax

{ABS <Number>}

Number	=	1 through 8; 1 = pressing F4 once, 2 = pressing F4 twice, and so on (optional)

{ABS} is equivalent to the Abs key, F4. The {ABS} macro converts relative cell addresses to absolute addresses. Number provides control over what part of the formula converts to an absolute address. {ABS 1} is equivalent to pressing F4 one time with the cell address selected; {ABS 2} is equivalent to pressing F4 twice, and so on, up to 8. If Number is missing, {ABS 1} is assumed.

{ABS} is most commonly used to create absolute addresses, which are handy for referencing a constant value that appears in only one place in a notebook but is copied in several formulas. The advantage of using absolute addresses is that formulas do not have to be edited if the absolute addresses are created before the formula is copied.

Tip

Include the {EDIT} command before {ABS} to make sure Edit mode is active.

Example

The following example converts the formula in the active cell with a relative cell address to an absolute cell address. Then it copies the formula to a new location five cells below and five cells to the right of the active cell.

\A	{EDIT}{ABS}~

{BlockCopy C(0)R(0),C(5)R(5)}

Related Topics


{ACTIVATE}

Syntax

{ACTIVATE WindowName}

WindowName	=	name of the window to make active

You can find the name of a window on its title bar.

{ACTIVATE} makes the window specified by the string WindowName active. For example, to make the named chart PROFITS (in the notebook REPORT.WB3) active, use

{ACTIVATE "C:\SALES\REPORT.WB3:PROFITS"}

Use the same syntax for activating dialog windows. To make the notebook itself active, use

{ACTIVATE "C:\SALES\REPORT.WB3"}

Related Topics


{ADDMENU}

Syntax

{ADDMENU MenuPath, MenuBlk}

MenuPath	=	location in the menu system to insert a new menu

MenuBlk	=	cells containing a menu definition

{ADDMENU} lets you add menus to the active menu system. (Use {ADDMENUITEM} to add individual menu commands to the active menu system.) MenuPath is a string that specifies where the new menu should appear. For example, to insert a menu before the Edit menu, use /Edit; to insert a menu before the Copy command on the Edit menu, use /Edit/Copy. You can use <- and -> to place a menu at the top or before the bottom of a menu, respectively. For example, /File/<- specifies the first item on the File menu.

You can also use numbers to identify menu commands. For example, /File/0 specifies the first item on the File menu (the ID numbers start at zero). When identifying a menu item with numbers, divider lines are considered menu items (for example, /File/5 specifies the first divider line on the File menu, not Properties).

MenuBlk includes the cells containing a menu definition. MenuBlk must include all cells in the new menu.

Tips

You can only add new menus to the menu bar on either side of the Edit and Tools menus--that is, one position to the left or right of the Edit menu and one position to the left or right of the Tools menu. The area between these menu positions is reserved for menus that change depending on the active window. Likewise, you cannot delete menus within this menu, either. You can add menu items to menus between the Edit and Tools menus, but the new menu items will be swapped out of the menu when the context changes.

Changes made to the menu system using this command are not saved; they are lost when you exit Corel Quattro Pro. Each time you run a macro containing {ADDMENU}, the menu changes appear again.

To restore the original menu bar, use the macro command {SETMENUBAR} without an argument.

Related Topics


{ADDMENUITEM}

Syntax

{ADDMENUITEM MenuPath, Name, <Link>, <Hint>, <HotKey>, <DependString>, <Checked>}

MenuPath	=	location in the menu system to insert a new menu item; enter the sequence of menu commands separated by forward slashes (/); you can use <- and -> to place a menu at the top or before the bottom of a menu, respectively. For example, /File/<- specifies the first item on the File menu. You can also use numbers to identify menu commands. For example, /File/0 specifies the first item on the File menu (the ID numbers start at zero).

Name	=	name of the command to add; if you want a letter of the name to appear underlined, precede it with an ampersand (&); to add a divider line, type a series of hyphens (-).

Link	=	action to perform when the command is chosen (optional); this argument can specify a link command or a macro command to run when the menu item is chosen; click here [image] for details.

Hint	=	help text to display in a popup window when the command is highlighted (optional)

HotKey	=	shortcut key that chooses the command (optional); separate key combinations with a plus sign (+), for example, Alt+F4.

DependString	=	areas in which the command is available (optional); enter Yes or No for each area, separated by commas, in the following order: desktop, notebook, chart window, dialog window, input line, Objects sheet. Example: "No, No, Yes, No, No, No" makes the menu item available only when the chart window is active.

Checked	=	type "Yes" if the command should have a checkmark display by it (optional)

{ADDMENUITEM} is like {ADDMENU}, but inserts a single menu item before MenuPath instead of a new menu.

See the description of {ADDMENU} for the syntax of MenuPath. Name is the name of the new menu item; if a command, precede its underlined letter with an ampersand (&).

Link specifies the actions the menu command performs (for example, "MACRO _remove_file" runs the macro _remove_file).

Tips

You can add menu items to any menu, but if you change a context-sensitive menu (all menus between Edit and Tools on the menu bar), the change only applies to the menu in the active window. For example, suppose you use a macro to change the View menu when the notebook window is active. If you then open a chart window, the chart View menu appears--without the change. If you want the change to apply to that View menu as well, you must run the macro again.

Changes made to the menu system using this command are not saved; they are lost when you exit Corel Quattro Pro. Each time you run a macro containing {ADDMENUITEM}, the menu changes appear again.

To restore the original menu bar, use the macro command {SETMENUBAR} without an argument.

Example

The following macro adds the menu command Find Object above Edit [image] Go To. Find Object runs a macro command called _FINDOBJ.

{ADDMENUITEM "/Edit/Go To","Find Object", "MACRO _FINDOBJ", "Finds a floating object on the notebook sheet", "Ctrl+Shift+F", "No, Yes, No, No, No, No", "No"}

Related Topics


{ADDSERIES}

Syntax

{ADDSERIES Block, Name}

Block	=	cells containing a data series

Name	=	name of the chart to which you want to add a series

{ADDSERIES} adds a data series to a floating chart. Use {ADDSERIES} as an equivalent to dragging cells onto a chart on a notebook sheet to add a series.

Examples

The following macro adds the series contained in the cells A:E3..E13 to the floating chart named BUDGET:

{ADDSERIES A:E3..E13, BUDGET}

Related Topics


{ADDSUBMENUITEM}

Syntax

{ADDSUBMENUITEM MenuPath, Name, <Link>, <Hint>, <HotKey>, <DependString>, <Checked>}

MenuPath	=	location in the menu system to insert a new menu item; enter the sequence of menu commands separated by forward slashes (/); you can use <- and -> to place a menu at the top or before the bottom of a menu, respectively. For example, /File/<- specifies the first item on the File menu. You can also use numbers to identify menu commands. For example, /File/0 specifies the first item on the File menu (the ID numbers start at zero).

Name	=	name of the command to add; if you want a letter of the name to appear underlined, precede it with an ampersand (&)

Link	=	action to perform when the command is chosen (optional); this argument can specify a link command or a macro command to run when the menu item is chosen; click here [image] for details.

Hint	=	help text to display on the status line when the command is highlighted (optional)

HotKey	=	shortcut key that chooses the command (optional); separate key combinations with a plus sign (+), for example, Alt+F4.

DependString	=	areas in which the command is available (optional); enter Yes or No for each area, separated by commas, in the following order: desktop, notebook, chart window, dialog window, input line, Objects sheet. Example: "No, No, Yes, No, No, No" makes the menu item available only when the chart window is active.

Checked	=	type "Yes" if the command should have a checkmark display by it (optional)

{ADDSUBMENUITEM} is like {ADDMENUITEM}, but converts the command indicated by MenuPath into a submenu and adds the new command to the submenu.

Link specifies the actions the submenu command performs (for example, "MACRO _remove_file" runs the macro _remove_file).

Tips

You can add menu items to any menu, but if you change a context-sensitive menu (all menus between Edit and Tools on the menu bar), the change only applies to the menu in the active window. For example, suppose you use a macro to change the View menu when the notebook window is active. If you then open a chart window, the chart View menu appears--without the change. If you want the change to apply to that View menu as well, you must run the macro again.

Changes made to the menu system using this command are not saved; they are lost when you exit Corel Quattro Pro. Each time you run a macro containing {ADDSUBMENUITEM}, the menu changes appear again.

Related Topics


{Alert}

Syntax

{Alert Title; Message; OKExit?<; Type; Icon; DefaultBtn>}

Title	=	Title of resultant dialog.

Message	=	Message text of resultant dialog.

OKExit?	=	Cell to store how the dialog box closed (1 for OK, 2 for Cancel, 3 for Abort, 4 for Retry, 5 for Ignore, 6 for Yes, 7 for No).

Type	=	0 for dialog with just an OK button, 1 for OK/Cancel, 2 for Abort/Retry/Ignore,3 for Yes/No/Cancel, 4 for Yes/No, and 5 for Retry/Cancel (optional; 0 is default).

Icon	=	0 for icon of type Error, 1 for Question, 2 for Warning, 3 for Info (optional; 0 is the default).

DefaultBtn	=	0 for first button being default, 1 for second, etc... (optional; 0 is the default).

Message displays a dialog box "message" for the user of the macro to manipulate. You set the title and message text of the dialog via the Title and Message arguments.

OKExit stores the result of the dialog box, so the macro can determine which button was pushed to close it.

Type specifies what type of message box will appear. It can be a message box with just an OK button, or one with both an OK and Cancel, etc.

Icon specifies which graphic to use on the above dialog. Zero represents the Error icon you would see on a regular error message under Windows. One is for the Question Mark icon, etc.

DefaultBtn determines which button (if there are multiple) is the "default" button. If this argument is a number greater than the number of buttons on the dialog, then the first button will be default.


{Align.Option}

Command equivalent	Equivalent to
{Align.Bottom}	Format [image] Align [image] Bottom
{Align.Horizontal_Center}	Format [image] Position [image] Horizontal Center
{Align.Horizontal_Space Value}	Format [image] Space [image] Horizontal Space
{Align.Left}	Format [image] Align [image] Left
{Align.Right}	Format [image] Align [image] Right
{Align.Top}	Format [image] Align [image] Top
{Align.Vertical_Center}	Format [image] Position [image] Vertical Center
{Align.Vertical_Space Value}	Format [image] Space [image] Vertical Space
{Align.Option} is the command equivalent for Format [image] Align; its action depends on whether a chart or dialog window is active.

Value is the amount of space to leave between controls, in pixels.

Related Topics


{ALT}

Syntax

{ALT+Key <Number>}

Key	=	keyboard macro command (PGUP, DOWN, and so on)

Number	=	number of times to repeat the operation (optional)

{ALT} emulates holding down the Alt key while pressing the key specified by Key. Uses of {ALT} that would perform Windows task-switching functions (like Alt+Tab and Alt+Esc) are ignored.

You can combine {ALT}, {CTRL}, and {SHIFT}. For example, {CTRL+SHIFT+D} is equivalent to pressing Ctrl+Shift+D, the Date keys.

Example

{ALT+F} emulates pressing Alt+F, which could activate a control in a dialog box with an underlined letter of F.

Related Topics


{AnalysisExpert}

{AnalysisExpert} is the command equivalent for Tools [image] Numeric Tools [image] Analysis. The macro has no arguments. {AnalysisExpert} displays the first Analysis Tools Expert dialog box.

Related Topics


{ANOVA1}

Syntax

{ANOVA1 InBlock, OutBlock, <Grouped>, <Labels(0|1)>, <Alpha>}

InBlock	=	input cells containing two or more sets of numeric data arranged in columns or rows

OutBlock	=	upper left cell of the output cells

Grouped	=	"C" to group results by column or "R" to group results by row; the default is "C"

Labels	=	1 if labels are located in the first column or row of the input cells; 0 if the input cells do not contain labels; the default is 0

Alpha	=	the significance level at which to evaluate values for the F-statistic; the default is 0.05

{ANOVA1} performs a one-way analysis of variance. Use {ANOVA1} to test whether two or more samples come from the same population. {ANOVA1} is equivalent to the Anova: One-Way analysis tool.

Related Topics


{ANOVA2}

Syntax

{ANOVA2 InBlock, OutBlock, SampleRows, <Alpha>}

InBlock	=	input cells containing two or more sets of numeric data arranged in columns; the first row must contain labels for each group; the first column must contain row labels indicating the beginning of each sample

OutBlock	=	upper left cell of the output cells

SampleRows	=	the number of rows in each sample

Alpha	=	the significance level at which to evaluate values for the F-statistic; the default is 0.05

{ANOVA2} performs a two-way analysis of variance, with more than one sample for each group of data. {ANOVA2} is equivalent to the Anova: Two-Way with Replication analysis tool.

Related Topics


{ANOVA3}

Syntax

{ANOVA3 InBlock, OutBlock, <Labels(0|1)>, <Alpha>}

InBlock	=	input cells containing two or more sets of numeric data arranged in columns or rows

OutBlock	=	upper left cell of the output cells

Labels	=	1 if labels are located in the first column or row of the input cells; 0 if the input cells do not contain labels; the default is 0

Alpha	=	the significance level at which to evaluate the F-statistic; the default is 0.05

{ANOVA3} performs a two-way analysis of variance, with only one sample for each group of data. {ANOVA3} is equivalent to the Anova: Two-Way Without Replication analysis tool.

Related Topics


{ANSIREAD}

Syntax

{ANSIREAD #Bytes, Location}

#Bytes	=	number of bytes of characters to read from a file

Location	=	cell in which to store the characters read

{ANSIREAD} reads #Bytes bytes of characters from a file previously opened using {OPEN} (starting at the current position of the file pointer), and stores them as a label in Location, like {READ} but without any character mapping. This macro is provided for international users. See {READ}, for more information.

Related Topics


{ANSIREADLN}

Syntax

{ANSIREADLN Location}

Location	=	cell in which to store the characters read

{ANSIREADLN} is like {ANSIREAD}, but instead of using a number of bytes to determine the amount of text to read, {ANSIREADLN} reads forward from the current file pointer location up to and including the carriage-return/linefeed at the end of the line, like {READLN} but without any character mapping. This macro is provided for international users. See {READLN}, for more information.

Related Topics


{ANSIWRITE}

Syntax

{ANSIWRITE String,<String2>,<String3,...>}

String	=	string of characters to be written into the open file

{ANSIWRITE} copies String(s) to a file opened with the {OPEN} command, starting at the location of the file pointer, like {WRITE} but without any character mapping. This macro is provided for international users. See {WRITE}, for more information.

Related Topics


{ANSIWRITELN}

Syntax

{ANSIWRITELN String,<String2>,<String3,...>}

String	=	string of characters to be written into the open file as a single line

{ANSIWRITELN} copies String(s) to a file opened with {OPEN}, starting at the location of the file pointer, and ends the string(s) with the carriage-return and linefeed characters, like {WRITELN} but without any character mapping. This macro is provided for international users. See {WRITELN}, for more information.

Related Topics


{Application.Property}

{Application.Property} is equivalent to choosing Tools [image] Settings. The next table lists the possible settings. Items marked with an asterisk (*) appear only in Developer mode.

To display a property description with syntax, choose that property in the following list:

Property	Tools [image] Settings option

Country_Settings	Currency [image] Change

Current_File	none

Display	Display

Enable_Inspection	Enable Inspection

File Options	File Options

General	General

International	International

Macro	Macro

Title	Title

You can use {Application?} or {Application!} to display the Application dialog box. {Application?} lets the user manipulate the dialog box, whereas {Application!} relies on the macro to manipulate it. {Application.Property} is equivalent to Tools [image] Settings.

Related Topics


{Application.Country_Settings}
{Application.Country_Settings "Symbol, Prefix|Suffix, Country"}

{Application.Country_Settings} sets the type of currency symbol and its placement before or after values for a particular country.

Tip

This macro replaces previous Corel Quattro Pro macros, {Application.International.Currency_Symbol} and {Application.International.Placement}.

Examples

The following macro sets the currency symbol to $ and places the symbol before values for United States currency values.

{Application.Country_Settings "$,Prefix,United States"}

Related Topics


{Application.Current_File}

{Application.Current_File} returns the name of the active notebook. This command equivalent is only used with @COMMAND and has no equivalent menu command.

Related Topics


{Application.Display<.Option>}

{Application.Display<.Option>}	Equivalent to Tools [image] Settings...
{Application.Display "Toolbar, InputLine, Status, RangeSyntax, PropBand, ScrollIndicator, Hint, DefaultView, SheetTabLabel, MinNumSheets, ShowGroupboxAsLine, ShowPreselection, ShowHistoryList"}	... Display
{Application.Display.Default_View Draft|Page}	Determines whether new Notebooks come up in Draft view or Page Preview view.  Equivalent to Tools [image] Settings [image] Display [image] Default View.
{Application.Display.History_List Yes|No}	Determines whether to display the File History List off the File menu or not.  Equivalent to Tools [image] Settings [image] Display [image] Display last open documents on the File menu.
{Application.Display.Min_Number_Sheets N}	Sets the default number of sheets on new Notebooks.  Equivalent to Tools [image] Settings [image] Display [image] Minimum Number of Sheet Tabs.
{Application.Display.Range_Syntax "A..B:A1..B2"|"A:A1..B:B2"}	... Display [image] 3-D Syntax
{Application.Display.Sheet_Tab_Label Letters|Numbers}	Allows you to choose whether your default sheet tab names are letters (A..IV) or numeric (Sheet1..Sheet256).  Equivalent to Tools [image] Settings [image] Display [image] Sheet Tab Label.
{Application.Display.Show_GroupBox_As_Line Yes|No}	Toggles dialog Group Boxes between being a "box", or just a line above the group.  Equivalent to Tools [image] Settings [image] Display [image] Show Groupbox as Line.
{Application.Display.Show_InputLine Yes|No}	... Display [image] Show Input Line
{Application.Display.Show_PreSelection Yes|No}	Toggles Windows buttons and other controls between being 3-D to being "flat." Equivalent to Tools [image] Settings [image] Display [image] Show PreSelection.
{Application.Display.Show_Property_Band Yes|No}	... Display [image] Show Property Bar
{Application.Display.Show_Scroll_Indicator Yes|No}	... Display [image] Show Scroll Indicators
{Application.Display.Show_StatusLine Yes|No}	... Display [image] Show Application Bar
{Application.Display.Sheet_Tab_Label Letters|Numbers}	Toggles dialog Group Boxes between being a "box," or just a line above the group.  Equivalent to Tools [image] Settings [image] Display [image] Sheet Tab Label.
{Application.Display.Show_Tool_Hint Yes|No}	... Display [image] Show QuickTips
{Application.Display.Show_Toolbar Yes|No}	... Display [image] Show Toolbar
{Application.Display.Option} is equivalent to choosing Tools [image] Settings [image] Display. It lets you specify cell syntax and display parts of the Corel Quattro Pro user interface. The arguments of {Application.Display} (which sets all options of the Display property in one command) use the same syntax as those in the {Application.Display.Option} commands.

Examples

The following macro command hides the time, hides the standard Toolbar, displays the input line and status line, sets the cell syntax to standard, hides the Property Bar, and displays the scroll indicators and QuickTips.

{Application.Display "None,No,Yes,Yes,A..B:A1..B2,No,Yes,Yes"}

Related Topics


{Application.Enable_Inspection}
{Application.Enable_Inspection Yes|No}

{Application.Enable_Inspection} enables (Yes) or disables (No) Object Inspector menus. It is the command equivalent for choosing Tools [image] Settings [image] Enable Inspection, which is only available in Developer mode.

Related Topics


{Application.File_Options<.Option>}

{Application.File_Options<.Option>}	Equivalent to Tools [image] Settings
{Application.File_Options StartupDir, AutoFile, FileExt, AutoBackup?(Yes|No),AutoBackupTime, FullPathTitles?(Yes|No), AutoBack,QuickTemplates?(Yes|No), QuickTemplateDir, URLUpdateTime, UpdateURL}	... File Options
{Application.File_Options.AutoBack_Enabled Yes|No}	... File Options [image] Timed document backup every
{Application.File_Options.AutoBack_Time Integer}	... File Options [image] Timed document backup every N minutes spinner
{Application.File_Options.Autoload_File String}	... File Options [image] Autoload File
{Application.File_Options.AutoRefreshTime N}	Sets when URLs Refresh.  Equivalent to Tools [image] Settings [image] File Options [image] Refresh URLs every N  minutes spinner.
{Application.File_Options.DoRefresh Yes|No}	Turns on/off URL Refresh.  Equivalent to Tools [image] Settings [image] File Options [image] Refresh URLs every.
{Application.File_Options.File_Extension String}	... File Options [image] File Extension
{Application.File_Options.Full_Path_Titles Yes|No}	... File Options [image] Enable Full Path Titles
{Application.File_Options.QuickTemplates Yes|No}	... File Options [image] Enable QuickTemplates
{Application.File_Options.Startup_Directory String}	... File Options [image] Default Folder
{Application.File_Options.TempDir Path}	... File Options [image] QuickTemplates
{Application.File_Options.WPDialogs Yes|No}	... File Options [image] Use enhanced file dialogs
{Application.File_Options.Option} is equivalent to choosing Tools [image] Settings [image] File Options. It lets you specify the startup folder, autoload file, default file extension, and other options. The arguments of {Application.File_Options} (which sets all options of the File Options property in one command) use the same syntax as those in the {Application.File_Options.Option} commands.

{Application.File_Options.AutoBack_Enabled} and {Application.File_Options.AutoBack_Time} enable the creation of temporary backup files at a specified time interval.

{Application.File_Options.Autoload_File} sets the file to be loaded every time Corel Quattro Pro is started.

{Application.File_Options.File_Extension} sets the default file extension to be used with file-handling commands.

{Application.File_Options.Full_Path_Titles} shows the full path of notebook files in the title bar of the notebook window.

{Application.File_Options.QuickTemplates} enables or disables the use of notebook templates when you choose File [image] New.

{Application.File_Options.Startup_Directory} sets the directory initially displayed by file-handling commands.

{Application.File_Options.TempDir} specifies the directory containing QuickTemplate files.

Examples

The following macro command sets the startup directory to C:\COREL\SUITE8, sets the autoload file to QUATTRO.WB3, sets the file extension to .WB3, enables autobackup at 15 minute intervals, enables the display of full path titles, enables QuickTemplates, sets the QuickTemplate directory, and sets the custom @function directory.

{Application.File_Options "C:\COREL\SUITE8\, QUATTRO.WB3, WB3, Yes, 15, Yes,, Yes,

C:\COREL\SUITE8\TEMPLATE, C:\COREL\SUITE8"}

Related Topics


{Application.General<.Option>}

{Application.General<.Option>}	Equivalent Tools [image] Settings...
{Application.General "UseUndo?(Yes|No), CompatibleKeys?(Yes|No), MoveCellOnEnter?(Yes|No),, DelayTime, Compatible_Formula_Entry?(Yes|No), Fit-As-You-Go?(Yes|No), Calc-As-You-Go?(Yes|No),QuickType?(Yes|No), CellReferenceChecker?(Yes|No)}	... General
{Application.General.Calc-As-You-Go Yes|No}	Turns on/off Calc As You Go.  Equivalent to Tools [image] Settings [image] General [image] Calc-As-You-Go.
{Application.General.Cell_Reference_Checker Yes|No}	Turns on/off the Cell Reference Checker.  Equivalent to Tools [image] Settings [image] General [image] Cell Reference Checker.
{Application.General.Compatible_Formula_Entry Yes|No}	... General [image] Compatible Formula Entry
{Application.General.Compatible_Keys Yes|No}	... General [image] Compatible Keys
{Application.General.Delay_Time Integer}	... General [image] Cell Drag and Drop Delay Time
{Application.General.Fit-As-You-Go Yes|No}	Turns on/off Fit-As-You-Go, which automatically sizes columns on data entry.  Equivalent to Tools [image] Settings [image] General [image] Fit-As-You-Go.
{Application.General.MoveCellOnEnterKey Yes|No}	... General [image] Move Cell Selector on Enter Key
{Application.General.QuickType Yes|No}	Turns on/off QuickType, which as you type a label or function, finds the the closest match. Equivalent to Tools [image] Settings [image] General [image] QuickType.
{Application.General.Undo Yes|No}	... General [image] Undo Enabled
{Application.General.Option} is equivalent to choosing Tools [image] Settings [image] General. It lets you

enable the Edit [image] Undo command

makes a variety of keys work in the same way as in Corel Quattro Pro for DOS

sets the behavior of the cell selector when you press Enter

specifies how long to wait before changing from cell selection to Drag-and-Drop mode

specifies whether to use formula entry from Corel Quattro Pro version 5

Examples

The following macro command enables Undo, makes the cell selector move down when you enter data, sets the cell drag and drop delay time to 400 milliseconds, and uses Corel Quattro Pro formula entry.

{Application.General "Yes,No,Yes,Yes,400,No,No,No,No"}

Related Topics


{Application.International<.Option>}

{Application.International<.Option>}	Equivalent to Tools [image] Settings...
{Application.International ", Currency, , Negative, Punctuation, DateFmt, TimeFmt, Language, Conversion, Country"}	... International
{Application.International.Currency "Windows Default"|"Corel Quattro Pro"}	... International [image] Currency
{Application.International.Date_Format String}	... International [image] Date Format
{Application.International.Language String}	... International [image] Language
{Application.International.LICS_Conversion Yes|No}	... International [image] Conversion
{Application.International.Negative Signed|Parens}	... International [image] Negative Values
{Application.International.Punctuation "1 234,56 (a1.a2)" | "1 234,56 (a1;a2)" | "1 234.56 (a1,a2)" | "1 234.56 (a1;a2)" | "1,234.56 (a1,a2)"| "1,234.56 (a1;a2)" | "1.234,56 (a1;a2)" | "1.234,56 (a1.a2)" | "Windows Default"}	... International [image] Punctuation
{Application.International.Time_Format String}	... International [image] Time
{Application.International.Option} is equivalent to choosing Tools [image] Settings [image] International, which lets you specify the punctuation, sort order, and numeric formats used by Corel Quattro Pro. The arguments of {Application.International} (which sets all options of the International property in one command) use the same syntax as those in the {Application.International.Option} commands. For example, the Negative argument can be Signed or Parens, the same settings that {Application.International.Negative} accepts.

Tip

To set the currency symbol and its placement either before or after values, use the {Application.Country_Settings} macro.

Examples

The following macro command specifies that the Corel Quattro Pro currency format is used with parentheses to indicate negative values, sets the punctuation, sets the date and time formats to Windows defaults, sets the sort order to English, disables LICS conversion, and sets the country used for currency to United States. The entire string must be enclosed within a set of quotes. (Enter all of the example into one cell.)

{Application.International ", Corel Quattro Pro,, Parens,""1,234.56 (a1,a2)"", Windows Default, Windows Default, Corel Quattro Pro, English (American), No, United States"}

Related Topics


{Application.Macro<.Option>}

{Application.Macro<.Option>}	Equivalent to Tools [image] Settings...
{Application.Macro "MacSuppress,, SlashKey, StartupMacro"}	... Macro
{Application.Macro.Macro_Redraw Both|None|Panel|Window}	... Macro [image] Suppress-Redraw
{Application.Macro.Slash_Key MenuName}	... Macro [image] Slash Key
{Application.Macro.Startup_Macro String}	... Macro [image] Startup Macro
{Application.Macro.Option} is equivalent to choosing Tools [image] Settings [image] Macro, which lets you control screen updates, display alternative menu systems, and run startup macros when you open a notebook. The arguments of {Application.Macro} (which sets all options of the Macro property in one command) use the same syntax as those in the {Application.Macro.Option} commands.

Example

The following macro command specifies that windows should not display when a macro runs, makes the slash key display the Corel Quattro Pro for DOS menu system, and sets the startup macro to BUDGET (Corel Quattro Pro will run a macro named BUDGET whenever a notebook is opened containing a macro by that name).

{Application.Macro "Window,,Corel Quattro Pro - DOS,BUDGET"}

Related Topics


{Application.Title Title}

{Application.Title Title} sets the title appearing in the Corel Quattro Pro title bar. It is equivalent to choosing Tools [image] Settings [image] Title, and it is only available in Developer mode.

Related Topics


{ASSIGN}

Syntax

{ASSIGN VarExpr, ValExpr}

VarExpr	=	a variable expression

ValExpr	=	a value expression

The {ASSIGN} macro command is equivalent to the assignment statement variable=value in a programming language.

Examples

{ASSIGN calc, CreateObject("DispCalc.Application")} creates an object of the DispCalc application and assigns it to a named variable calc.

{ASSIGN calc.accum, 0} clears the accumulated value of DispCalc.

{ASSIGN calc.accum, @SUM(A1..A10)} assigns the sum of A1..A10 to the accumulated value of DispCalc.

For more details on using {ASSIGN} and other OLE automation macro commands, Using OLE Automation Features.

Related Topics


{Audit.Remove_All_Arrows}

Removes all precedent and dependent arrows.

Equivalent to Tools [image] Auditing [image] Remove All Arrows

Related Topics


{Audit.Trace_Dependents}

Traces dependents of current formula.

Equivalent to Tools [image] Auditing [image] Trace Dependents

Related Topics


{Audit.Trace_Precedents}

Traces precedents to current formula.

Equivalent to Tools [image] Auditing [image] Trace Precedents.

Related Topics


{BACKSPACE}
{BACKSPACE} and {BS}

Syntax

{BACKSPACE <Number>}

Number	=	any positive integer or the address of a cell containing a positive integer (optional)

{BACKSPACE} and {BS} are equivalent to the Backspace key, which deletes one character to the left of the insertion point in Edit mode. The optional argument Number specifies how many times to repeat the operation; for example, {BACKSPACE 2} is equivalent to pressing Backspace twice.

Related Topics


{BACKTAB}

Syntax

{BACKTAB <Number>}

Number	=	any positive integer or the address of a cell containing a positive integer (optional)

{BACKTAB} is equivalent to the Shift+Tab key. It is the same as {BIGLEFT}, which moves one cell to the left.

Tip

When the Compatible Keys option of Tools [image] Settings [image] General is checked, {BACKTAB} selects the leftmost cell of the screen that is to the left of the current one.

The optional argument Number specifies how many times to repeat the operation; for example, {BACKTAB 3} is equivalent to pressing Shift+Tab three times.

Related Topics


{BEEP}

Syntax

{BEEP <Number>}

Number	=	1 to 10 (optional)

{BEEP} sounds the computer's built-in speaker.

Number dictates the tone of the beep. If Number is omitted, {BEEP 1} sounds. If Number is larger than 10, the pattern repeats; for example, {BEEP 11} is the same as {BEEP 1}.

Use {BEEP} to catch the user's attention. You can use it in interactive macros to introduce a prompt for information or to indicate a macro has finished.

Example

The following macro checks a cell area named error_check for an error condition (indicated by error_check containing zero). If there is no error, it branches to a macro called _continue, which carries on the previous procedure. If there is an error, it gives a low beep, then a medium beep, and moves the selector to the cell area called message_area, where an error message is stored.

{IF error_check = 0}{BRANCH _continue}

{BEEP 1}{BEEP 5}{EditGoto message_area}

Related Topics


{BIGLEFT}

Syntax

{BIGLEFT <Number>}

Number	=	any positive integer or the address of a cell containing a positive integer (optional)

{BIGLEFT} is equivalent to the Shift+Tab key. It is the same as {BACKTAB}, which moves one cell to the left.

Tip

When the Compatible Keys option of Tools [image] Settings [image] General is checked, {BIGLEFT} selects the leftmost cell of the screen that is to the left of the current one.

The optional argument Number specifies how many times to repeat the operation; for example, {BIGLEFT 2} is equivalent to pressing Shift+Tab twice.

Related Topics


{BIGRIGHT}

Syntax

{BIGRIGHT <Number>}

Number	=	any positive integer or the address of a cell containing a positive integer (optional)

{BIGRIGHT}, like {TAB}, is equivalent to the Tab key, which moves one cell to the right.

Tip

When the Compatible Keys option of Tools [image] Settings [image] General is checked, {BIGRIGHT} selects the leftmost cell of the screen that is to the right of the current one.

The optional argument Number specifies how many times to repeat the operation; for example, {BIGRIGHT 2} is equivalent to pressing Tab twice.

Related Topics


{BLANK}

Syntax

{BLANK Location}

Location	=	cell(s) you want erased

{BLANK} erases the contents of the cells referred to as Location. You can also use the command equivalents {ClearContents} and {EditClear} to erase the contents of the currently selected cells.

Example

This macro erases the cells named part_list:

\F	{BLANK part_list}

Related Topics


{BlockCopy}

Syntax

{BlockCopy SourceBlock, DestBlock, <ModelCopy?(0|1)>, <Formula?(0|1)>, <Values?(0|1)>, <Properties?(0|1)>, <Objects?(0|1)>, <Row/Col_Sizes?(0|1)>, <Labels?(0|1)>, <Numbers?(0|1)>}

SourceBlock	=	cells to copy

DestBlock	=	location to copy cells

ModelCopy?	=	whether to use Model Copy option; 0 = no, 1 = yes; the default is 0

Formula?	=	whether to copy formula cells; 0 = no, 1 = yes; the default is 1

Values?	=	whether to copy value cells; 0 = no, 1 = yes; the default is 1

Properties?	=	whether to copy properties; 0 = no, 1 = yes; the default is 1

Object?	=	whether to copy objects; 0 = no, 1 = yes; the default is 1

Row/Col_Sizes?	=	whether to copy row and column sizes; 0 = no, 1 = yes; the default is 1

Labels?	=	whether to copy label cells; 0 = no, 1 = yes; the default is 1

Numbers?	=	whether to copy number cells; 0 = no, 1 = yes; the default is 1 (reserved for Cell Comments)

{BlockCopy} is the command equivalent for Edit [image] Copy Cells. It copies the source cells to the specified destination. If ModelCopy? is 1, absolute references to cells within the copied cells adjust to reflect the new location. Formula?, Values?, Properties?, Object?, Row/Col_Sizes?, Labels?, and Numbers? apply only if ModelCopy? is 1.

You can use {BlockCopy?} or {BlockCopy!} to display the Copy Cells dialog box. {BlockCopy?} lets the user manipulate the dialog box, whereas {BlockCopy!} relies on the macro to manipulate it.

Related Topics


{BlockDelete.Option}

Command equivalent	Equivalent Edit [image] Delete...
{BlockDelete.Columns Block, Entire|Partial}	... Columns
{BlockDelete.Pages Block, Entire|Partial}	... Sheets
{BlockDelete.Rows Block, Entire|Partial}	... Rows
{BlockDelete.Option} is the command equivalent for Edit [image] Delete. It deletes entire or partial columns, rows, and sheets. Block is the 2-D or 3-D selection where material is deleted.

You can use {BlockDelete?} or {BlockDelete!} to display the Delete dialog box. {BlockDelete?} lets the user manipulate the dialog box, whereas {BlockDelete!} relies on the macro to manipulate it.

Related Topics


{BlockFill.Option}

Command equivalent	Equivalent to Edit [image] Fill [image] Fill Series...
{BlockFill.Block Block}	... Cells
{BlockFill.Go}	... OK
{BlockFill.Order Column|Row}	... Fill [image] Order
{BlockFill.Series Linear | Growth | Power | Year | Month | Week | Weekday |Day | Hour | Minute | Second}	... Fill [image] Series
{BlockFill.Start Value}	... Fill [image] Start
{BlockFill.Step Value}	... Fill [image] Step
{BlockFill.Stop Value}	... Fill [image] Stop
{BlockFill.Option} is the command equivalent for Edit [image] Fill [image] Fil Series. It fills Block with sequential data. You can use numbers, dates, times, or even formulas for Value.

If {BlockFill.Start} is a number or formula, you can enter one of these strings for {BlockFill.Series}:

"Linear" adds the step value to the previous value (defined at first to be the start value).

"Growth" multiplies the step value by the previous value.

"Power" uses the step value as the exponent of the previous value.

If {BlockFill.Start} is a date or time, the fill operation is always linear, but you can specify the step unit as "Year", "Month", "Week", "Weekday", "Day", "Hour", "Minute", or "Second". For example, with a start value of 6/20/92, a step value of 2, and "Month" as the {BlockFill.Series Option} setting, the second cell in the filled cells contains August.

You can enter the date and time directly as a serial number or use one of the date and time @functions.

You can use {BlockFill?} or {BlockFill!} to display the Fill Series dialog box. {BlockFill?} lets the user manipulate the dialog box, whereas {BlockFill!} relies on the macro to manipulate it.

Example

The following macro uses @DATEVALUE to enter 6/20/92 as the start value. The 3-D selection to fill is B..C:B1..D4 with a step value of 2. Fill order is "Row".

{BlockFill.Block B:B1..C:D4}

{BlockFill.Start @DATEVALUE("6/20/92")}

{BlockFill.Step 2}

{BlockFill.Stop @DATEVALUE("12/31/2099")}

{BlockFill.Order Row}

{BlockFill.Series Month}

{BlockFill.Go}

Related Topics


{BlockInsert.Option}

Command equivalent	Equivalent to...
{BlockInsert.Columns Block, Entire|Partial}	Insert [image] Cells [image] Columns
{BlockInsert.File FileName, BeforeBlock}	Insert [image] File
{BlockInsert.Pages Block, Entire|Partial}	Insert [image] Cells [image] Sheets
{BlockInsert.Rows Block, Entire|Partial}	Insert [image] Cells [image] Rows
{BlockInsert.Option} is the command equivalent for Insert [image] Cells and Insert [image] File. It inserts entire or partial columns, rows, and sheets, or complete files. Block is the 2-D or 3-D selection where material is inserted. In {BlockInsert.File}, Filename is inserted into the active notebook before BeforeBlock.

You can use {BlockInsert?} or {BlockInsert!} to display the Insert Cells dialog box. {BlockInsert?} lets the user manipulate the dialog box, whereas {BlockInsert!} relies on the macro to manipulate it.


{BlockMovePages}

Syntax

{BlockMovePages SrcPages, BeforePage}

SrcPages	=	range of sheets to move

BeforePage	=	new location for SrcPages

{BlockMovePages} is the command equivalent for Edit [image] Move Sheets. It reorders sheets within a notebook. Moved sheets appear before BeforePage.

You can use {BlockMovePages?} or {BlockMovePages!} to display the Move Sheets dialog box. {BlockMovePages?} lets the user manipulate the dialog box, whereas {BlockMovePages!} relies on the macro to manipulate it.

Related Topics


{BlockName.Option}

Command equivalent	Equivalent to Insert [image] Cell Names...
{BlockName.Autogenerate Block, LabelsTop?(0|1), LabelsLeft?(0|1), LabelsBottom?(0|1), LabelsRight?(0|1), Intersection?(0|1)}	... Generate
{BlockName.Create BlockName, Block}	... Add
{BlockName.Delete BlockName}	... Delete
{BlockName.Labels Block,Left|Right|Up|Down}	... Labels
{BlockName.MakeTable Block}	... Output
{BlockName.Reset}	... Delete All
{BlockName.Option} is the command equivalent for Insert [image] Cell Names. It creates, deletes, and displays names for contiguous and noncontiguous selections.

BlockName is the cell name to create or delete. In {BlockName.Create}, Block refers to the cells to name; in {BlockName.MakeTable}, Block indicates where to create the name table. {BlockName.Reset} clears all cell names in the notebook.

You can use {BlockName?} or {BlockName!} to display the Cell Names dialog box. {BlockName?} lets the user manipulate the dialog box, whereas {BlockName!} relies on the macro to manipulate it.

Related Topics


{BlockReformat}

Syntax

{BlockReformat Block}

Block	=	the cells to reformat

{BlockReformat} is the command equivalent for Format [image] Text Reformat. It adjusts word wrapping in a series of label entries (contained in Block) as though they were in a paragraph.

Related Topics


{BlockTranspose}

Syntax

{BlockTranspose SourceBlock,DestBlock}

SourceBlock	=	cells to transpose

DestBlock	=	cells to hold transposed copy

{BlockTranspose} is the command equivalent for Tools [image] Numeric Tools [image] Transpose. It copies SourceBlock to another location and reverses its rows and columns. Existing data in DestBlock is overwritten.

You can use {BlockTranspose?} or {BlockTranspose!} to display the Transpose Cells dialog box. {BlockTranspose?} lets the user manipulate the dialog box, whereas {BlockTranspose!} relies on the macro to manipulate it.

Related Topics


{BlockValues}

Syntax

{BlockValues SourceBlock,DestBlock}

SourceBlock	=	cells to copy as values

DestBlock	=	cells to hold converted copy

{BlockValues} is the command equivalent for Edit [image] Convert to Values. It copies cells to another location and converts their formulas to values. Existing data in DestBlock is overwritten.

You can use {BlockValues?} or {BlockValues!} to display the Convert to Values dialog box. {BlockValues?} lets the user manipulate the dialog box, whereas {BlockValues!} relies on the macro to manipulate it.

Related Topics


{BRANCH}

Syntax

{BRANCH Location}

Location	=	location or name of another macro

{BRANCH} runs the macro stored in Location. If Location references cells, Corel Quattro Pro starts with the macro command in the top left cell.

{BRANCH} can change the flow of execution based on a condition test. For example, you can use it to run a different macro depending on the contents of a certain cell.

{BRANCH} is like {Subroutine} in that it passes control to another macro. Unlike {Subroutine}, it does not hold your place in the original macro, waiting for control to return. Use {BRANCH} when you do not intend to return to the original macro. To run another macro and then return to the calling macro, use {Subroutine}.

Example

The following macro branches to a macro named _high if the value in cell D10 is greater than 1000; otherwise, it continues to run the macro on the next line:

{IF D10 > 1000}{BRANCH _high}

Related Topics


{BREAK}

{BREAK} clears any displayed dialog boxes or prompts and returns Corel Quattro Pro to Ready mode. It does not stop macro execution; use {QUIT} for that operation.

Related Topics


{BREAKOFF}

{BREAKOFF} disables Ctrl+Break, which can be used to end a macro before it is done. After {BREAKOFF}, the user will not be able to exit a macro until the end of the macro or until {BREAKON} is used.

Tip

Use {BREAKOFF} only when necessary. Without access to Ctrl+Break, the only way to stop a "runaway" macro is to reboot or turn off the computer.

Example

This macro disables Ctrl+Break while the user inputs a name:

{PUTCELL "Enter your name here:"}

{BREAKOFF}

{?}~

{BREAKON}

{PUTCELL "Try again: "}

{?}~

Related Topics


{BREAKON}

{BREAKON} enables Ctrl+Break after a previous {BREAKOFF} command has disabled it.

{BREAKON} should be used as soon as possible after {BREAKOFF}, because with Ctrl+Break disabled, the only way to halt a "runaway" macro is to reboot or turn off the computer.

See {BREAKOFF} for an example of {BREAKOFF} and {BREAKON}.

Related Topics


{BudgetExpert}

{BudgetExpert} is the command equivalent for Tools [image] Numeric Tools [image] Budget. The macro has no arguments. {BudgetExpert} displays the first Budget Expert dialog box.

Related Topics


{CALC}

{CALC} is equivalent to the Calc key, F9, which recalculates the active notebook, or converts the formula on the input line into its result when editing a cell.

Related Topics


{CAPOFF} and {CAPON}

{CAPOFF} and {CAPON} are equivalent to Caps Lock off and Caps Lock on, respectively.

Related Topics


{ChartExpert}

{ChartExpert} is the command equivalent for Insert [image] Chart. The macro has no arguments. {ChartExpert} displays the first Chart Expert dialog box.

Related Topics


{CHOOSE}

{CHOOSE} displays a pick list of open windows. Your choice becomes the active window.

Related Topics


{CLEAR}

{CLEAR} is the equivalent of Ctrl+Backspace, which erases any previous entry in a prompt line or on the input line in Edit mode. This command is useful when loading or retrieving files.

Related Topics


{ClearComments}
{ClearComments <PageOnly? (0|1)>}

Deletes the comment in the active cell. PageOnly? flat refers to Group Mode.  If Group mode is off, enter 0; if Group mode is on, and the active sheet belongs to a group, enter 1 to operate on only the active sheet or 0 to act on all sheets in the group. Equivalent to Rt-Clicking on the current cell, and choosing Delete Comment.


{ClearContents}

Syntax

{ClearContents <PageOnly?(0|1)>}

PageOnly?	=	if Group mode is off, enter 0; if Group mode is on, and the active sheet belongs to a group, enter 1 to operate on only the active sheet or 0 to act on all sheets in the group

{ClearContents} is the command equivalent for Edit [image] Clear [image] Values. It erases the contents of the selected cells but leaves cell property settings intact.

Related Topics


{ClearFormats}

Syntax

{ClearFormats <PageOnly?(0|1)>}

PageOnly?	=	if Group mode is off, enter 0; if Group mode is on, and the active sheet belongs to a group, enter 1 to operate on only the active sheet or 0 to act on all sheets in the group

{ClearFormats} is the command equivalent for Edit [image] Clear [image] Formats. It resets the properties of cells but retains the values.

Related Topics


{CLOSE}

{CLOSE} ends access to a file previously opened using {OPEN}. This lets another file be opened (only one can be open at a time). {CLOSE} completes the process of writing information to a file, including an update of the disk directory. This step is crucial to the integrity of any file. If your computer is turned off before a file is closed, that file's contents may become corrupted or lost.

{CLOSE} fails in the event of a disk error, such as when a disk is removed from the disk drive before the file is closed. In this case, {ONERROR} is useful in intercepting the error. If {CLOSE} succeeds, macro execution continues in the cell below the cell containing the {CLOSE} command, ignoring any other commands in that cell. If {CLOSE} fails, macro execution continues in the same cell as the {CLOSE} command.

Example

The following macro opens a new file in drive A called AFILE, writes the text line Hello, world! to the file, and closes the file.

\F	{OPEN "A:\AFILE",W}

{WRITELN "Hello, world!"}

{CLOSE}

Related Topics


{COLUMNWIDTH}

Syntax

{COLUMNWIDTH Block, FirstPane?, Set/Reset/Auto, Size}

Block	=	cells containing columns to resize

FirstPane?	=	1 to resize columns in left or top window pane; 0 to resize columns in right or bottom window pane

Set/Reset/Auto	=	0 to set the column width; 1 to reset the column width; 2 to automatically size the column(s)

Size	=	new width (in twips) if Set/... = 0; not needed if Set/... = 1; resetting size; extra characters (optional) if Set/... = 2

{COLUMNWIDTH} provides three ways to change the width of a column or columns (it is equivalent to the cell property Column Width). The columns to change are specified by Block. FirstPane? is used when the active window is split into panes (using View [image] Split Windows). To resize the columns in the left or top pane, set FirstPane? to 1; to resize the columns in the right or bottom pane, set FirstPane? to 0.

The argument Set/Resize/Auto specifies how to change the width. To set a column width, use this syntax: {COLUMNWIDTH Block, FirstPane?, 0, NewSize}.

NewSize is the new column width, in twips (a twip is 1/1440th of an inch). The maximum width is 20 inches (28,800 twips).

To reset a column to the default width (set by Default Width in the sheet Object Inspector) use this syntax: {COLUMNWIDTH Block, FirstPane?, 1}.

To automatically size a column based on what is entered in it, use this syntax: {COLUMNWIDTH Block, FirstPane?, 2, ExtraCharacters}

ExtraCharacters is the number of characters to add on to the calculated width. If this argument is omitted, the default is used (1 character).

Examples

{COLUMNWIDTH A:A..B,1,0,1440} sets the width of columns A and B (on sheet A) to one inch (1,440 twips).

{COLUMNWIDTH A:A..B,0,0,2160} sets the width of columns A and B (on sheet A) to one and a half inches (2,160 twips). If the window is split, the columns are resized in the left or top pane.

{COLUMNWIDTH A:C,1,1} resets the width of column C (on sheet A) to the default width.

{COLUMNWIDTH A:C,1,2,3} automatically sizes column C (on sheet A) and adds three characters to the calculated width.

Related Topics


{Comment.Edit}
{Comment.Edit <CommentText>}

Creates/updates a comment in the active cell, and leaves comment "bubble" in edit mode for you to insert the comment text. If a comment already exists, it brings up the comment "bubble" in edit mode for you to edit the existing comment. Equivalent to Insert [image] Comment, or Rt-Clicking on a cell, and choosing Insert Comment (or Edit Comment, if you are editing an existing comment).


{CommentEditURL}
{Comment.EditURL <URLText>}

Brings up the Insert [image] Hyperlink dialog, allowing the user to insert, modify, or delete a hyperlink. Equivalent to Insert [image] Hyperlink.


{ComposeFormula}

{Compose Formula} is the command equivalent of clicking the Formula Composer button on the Notebook toolbar. The macro has no arguments. {ComposeFormula} displays the Formula Composer dialog box.

Related Topics


{Consolidate.Option}

Command equivalent	Equivalent to Tools [image] Consolidate [image] Edit...
{Consolidate.Add_Source_Block <Block>}	... Add
{Consolidate.Destination <Block>}	... Destination Cells
{Consolidate.Function SummaryFunction}	... Operation
{Consolidate.Go}	... Consolidate
{Consolidate.Options OutputWithFormulas?(0|1), LabelsInTopRow?(0|1), LabelsInLeftCol?(0|1)}	... Options
{Consolidate.Remove Name}	... Delete
{Consolidate.Remove_Source_Block <Block>}	... Remove
{Consolidate.Reset}	No equivalent; clears Source Cells and Destination Cells, and resets Options to default values in the Consolidation dialog box.
{Consolidate.Save Name}	... Save As
{Consolidate.Use Name}	... Consolidations
{Consolidate.Option} is the command equivalent for Tools [image] Consolidate [image] New. It combines data from multiple selections into one using your choice of operators. Block defaults to the current selection if the argument is not supplied.

You can use {Consolidate?} or {Consolidate!} to display the Consolidation dialog box. {Consolidate?} lets the user manipulate the dialog box, whereas {Consolidate!} relies on the macro to manipulate it.

Example

The following macro adds the values in the source cellss B2..B4, C2..C3, and D2..D4, and returns values in the destination cells F2..F4.

{Consolidate.Add_Source_Block A:B2..B4}

{Consolidate.Add_Source_Block A:C2..C3}

{Consolidate.Add_Source_Block A:D2..D4}

{Consolidate.Function SUM}

{Consolidate.Destination A:F2..F4}

{Consolidate.Options 1,0,0}

{Consolidate.Go}

{Consolidate.Save CONSOL1}

Related Topics


{ConsolidateExpert}

{ConsolidateExpert} is the command equivalent for Tools [image] Consolidate [image] New. The macro has no arguments. {ConsolidateExpert} displays the first Consolidate Expert dialog box.

Related Topics


{CONTENTS}

Syntax

{CONTENTS Dest, Source, <Width#>, <Format#>}

Dest	=	cell you want data written to

Source	=	cell you want data copied from

Width#	=	optional column width (1 to 1023)

Format#	=	optional format code

{CONTENTS} copies the contents of Source into Dest, but unlike {LET} or other copy commands, if Source contains a value entry, it translates the copied value into a label and stores it in Dest. It also lets you specify a different numeric format and column width using the Width# and Format# arguments.

Width# can be any number from 1 to 1023. Corel Quattro Pro will not alter the width of the destination column but will treat the resulting string as if it came from a column with the specified width. For example, if a value is displayed as ***** in the source column because the column is not wide enough, specifying a wider Width# will let the value be copied as it would be displayed within that width, not as *****. Width# is optional, but must be provided if Format# is used. If you do not specify Width#, the width of the source column is assumed. Use the maximum width if you want all values to come across properly. You can use @TRIM with a {LET} command to remove any leading spaces from the label.

Format# can be any number from 0 to 127. Each number in this range corresponds to a specific numeric format and decimal precision. Format# affects the Dest entry only, not the Source value. See Numeric Format Codes for a list of special codes used to indicate numeric formats with Format#.

Examples

The following examples assume cell C18 contains the value 48,988 in comma format with a column width of 12.

{CONTENTS A18,C18}

Places the 12-character label '      48,988 in cell A18 (six spaces are inserted at the beginning).

{CONTENTS E10,C18,3}

Places the 3-character label '*** in cell E10. (Only asterisks are copied because the value does not fit within three spaces.)

{CONTENTS A5,C18,15,34}

Places the 15-character label '     $48,988.00 in cell A5 (five spaces are inserted at the beginning).

Related Topics


{Controls.Option}

Command equivalent	Equivalent to...
{Controls.Order}	Format [image] Value Order [image] Set New
{Controls.OrderFrom}	Format [image] Value Order [image] Reorder From First
{Controls.OrderTab}	Format [image] Tab Order [image] Set New
{Controls.OrderTabFrom}	Format [image] Tab Order [image] Reorder From First
{Controls.Option} is equivalent to Format [image] Value Order and Format [image] Tab Order. It affects selected objects in the dialog window.

Related Topics


{CR}
{CR} or ~

{CR} or ~ (tilde) are equivalent to the Enter key.

Related Topics


{CREATEOBJECT}

Syntax

{CREATEOBJECT ObjectType, x1, y1, x2, y2<, x3, y3, ...>}

ObjectName	=	type of object to create

x1, y1	=	xy coordinates for the starting point of the object; the upper left corner for rectangles and objects bounded by rectangles

x2, y2	=	xy coordinates for the end point or next point of the object; the width and height for rectangles and objects bounded by rectangles

x3, y3	=	xy coordinates for the next or last point of a polyline or polygon object

With {CREATEOBJECT} you can add objects to the active window normally added using the Toolbar. {CREATEOBJECT} is context-sensitive, letting you create lines in a chart window or check boxes in a dialog window. Corel Quattro Pro interprets the coordinates specified after ObjectType differently based on the object type. The following table lists the possible chart object settings for ObjectType, and how each chart object uses the (x,y) coordinates.

Chart Objects {CREATEOBJECT} Can Generate

Object	# of (x,y)'s	Coordinates

Line	2	1st: Start point, 2nd: End point

Arrow	(same as for Line)

Block	2	1st: Upper left corner, 2nd: Width and height of the objects (in relative coordinates)

Rect (Rectangle)	2	(same as for Block)

Ellipse	2	1st: Upper left corner of a rectangle bounding the ellipse; 2nd: Width and height of the bounding rectangle

Rounded_Rect	(same as for Block)

Text	(same as for Block)

Polyline	Varies	1st: Start point, 2nd: End point of first segment and start of second segment; 3rd: End point of second segment and start of third segment, ... nth: End point

Polygon	(same as for Polyline)

Freehand_Polyline	(same as for Polyline)

Freehand_Polygon	(same as for Polyline)

Block Objects

The Block object has additional arguments for {CREATEOBJECT}:

{CREATEOBJECT ObjectType, x1, y1, x2, y2, "Block", "RowBorders?(Yes|No), ColBorders?(Yes|No), HorzGridLines?(Yes|No), VertGridLines?(Yes|No), AspectRatio?(Yes|No)"}

Block sets the notebook cells to use. The remaining arguments specify whether to show borders and grid lines and whether to maintain the cells' aspect ratio.

Dialog Controls {CREATEOBJECT} Can Generate

You can create these dialog controls listed in the order they appear on the Dialog Toolbar: Button, CheckBox, RadioButton, BitmapButton, Label, EditField, SpinCtrl, Rectangle, GroupBox, RangeBox, ComboBox, PickList, FileCtrl, ColCtrl, ScrollBar, HScrollBar, TimeCtrl. When creating a control, x1 and y1 specify the upper-left corner of the control; x2 and y2 specify the width and height of the control, in pixels.

ObjectType is enclosed in quotes. The x and y coordinates for each point follow, separated by commas.

Examples

{CREATEOBJECT "Rect",86,11,94,74} creates a rectangle with upper-left corner = (86,11), width = 94, and height =74 (pixels).

{CREATEOBJECT "Block", 363, 260, 1278, 1139, "A:B2..D9", "No,No,Yes,Yes,Yes"} creates notebook cells in a chart window with upper-left corner = (363, 260), width = 1278, and height = 1139; the other arguments specify the notebook cells, turn off row and column borders, show grid lines, and maintain the cells' aspect ratio.

{CREATEOBJECT "Line",260,238,356,228} creates a line that starts at (260,238) and ends at (356,228).

{CREATEOBJECT "Polyline",2,2,23,59,11,26} creates a polyline that starts at (2,2), draws a line to (23,59), and then draws a line from that point to (11,26).

Related Topics


{CrossTab}

Equivalent to Tools [image] Data Tools [image] Cross Tabs.

Syntax

{CrossTab "Input Cells";"Output cells";"<3D Page Name>";"Row 1;<Row 2>;<Row 3>";"Column 1;<Column 2>;<Column 3>";"Data 1: Data Option,<Data 2: Data Option>";"<Row 1: Option>,<Row 2: Option>,<Row 3: Option>,<Column 1: Option>,<Column 2: Option>,<Column 3: Option>"}

Data Option	=	SUM, AVERAGE, COUNT, % of COLUMN, % of ROW, % of GRAND, or STRING

Row and Column Options	=	SUM, AVERAGE, COUNT, % of COLUMN, % of ROW, % of GRAND, INCREASE, % INCREASE, or STRING

All items surrounded by <> are optional. All quotes in this macro command must be included in order for the macro to function.

All Column, Row and Data items are to be replaced with the field number containing the data to be used. Fields go from 0 to however many columns are passed into Cross Tabs. Columns are numbered from left to right in the source range, 0 being the first column of the selection.

Example

{CrossTab "A:A1..H145";"B:A1";"";"0,1";"2,3,4";"6: SUM";"4: AVERAGE"}

Notice that if the 3D Sheet Name is not included, the macro must have the empty quotes or it will not function properly.


{CTRL}

Syntax

{CTRL+Key <Number>}

Key	=	keyboard macro command (PGUP, DOWN, and so on)

Number	=	number of times to repeat the operation (optional)

{CTRL} emulates holding down the Ctrl key while pressing a keystroke. For example, {CTRL+PGDN 5} emulates pressing Ctrl+PgDn five times to move down five notebook sheets. Keystrokes that would perform Windows task switching, such as Ctrl+Esc, are ignored.

You can combine {ALT}, {CTRL}, and {SHIFT}. For example, {CTRL+SHIFT+D} is equivalent to pressing Ctrl+Shift+D, the Date keys.


{DatabaseQuery}

Syntax

{DatabaseQuery Type; Name; QueryString; Destination}

Type	=	Type of database to query: "Paradox", "ODBC", or "BDE (Borland Database Engine)".

Name	=	Name of the database. If the type is Paradox, the name must be a path. If the type is ODBC, the name is a Data Source Name (DSN) from the user's ODBC configuration. If the name is BDE, the name is an alias name from the user's IDAPI/BDE configuration.

QueryString	=	An SQL Statement.

Destination	=	The destination block of cells where to send the result.

The {DatabaseQuery} macro sends the specified SQL statement to either ODBC or BDE and places the returned data in the specified block of cells.

{DatabaseQuery} is equivalent to Insert [image] External Data [image] Expert.


{DATE}

{DATE} is equivalent to pressing Ctrl+Shift+D, which lets users enter a date or time into the active cell.

Tip

You can enter a date in a cell without using Ctrl+Shift+D. Just type a date in one of Corel Quattro Pro's date formats--for example, 6/1/95.

Examples

{DATE}8/6/90~	enters 8/6/90 in the active cell as a date.

{DATE}{?}~	pauses to let the user enter a date, then enters that date into the active cell.

Related Topics


{DbAlias}

Syntax

{DbAlias WORK | PRIV, Path}

WORK | PRIV	=	WORK to specify a Working directory; PRIV to specify a Private directory

Path	=	path for the Working directory or the Private directory

{DbAlias} is the command equivalent for Insert [image] External Data [image] Aliases which lets you specify a private directory to hold temporary files, or a working directory where external data tables are most likely to be found.

Related Topics


{DEFINE}

Syntax

{DEFINE Location1<:Type1>, Location2<:Type2>,...}

Location	=	cell in which you want to store the argument being passed

Type	=	string or value; string (or s) stores the value or formula as a label, and value (or v) stores the actual value or value resulting from a formula (optional)

When you pass control to a subroutine with the {Subroutine} command, you can also pass arguments for use by that subroutine. If you do, you must include a {DEFINE} command in the subroutine's first line. This command defines the data type of *each argument passed and indicates which cells to store the arguments in. If no {DEFINE} command is included, the arguments are ignored.

{DEFINE} sequentially defines the arguments passed to the subroutine. The first location and type given are assigned to the first argument passed, the second location and type to the second argument, and so on.

You must specify a location for each argument. This tells Corel Quattro Pro where to copy them. If there are more locations given than arguments passed, or more arguments than locations, the macro ends immediately, and an error message displays.

Type is optional. It tells Corel Quattro Pro whether the argument is a value or string. If no data type is given, the argument is assumed to be a literal string (even if it is a valid cell name, cell address, or value). If you add :string (or :s) to the location, any argument passed is stored as a label. If you add :value (or :v), Corel Quattro Pro treats the coming argument as a number or value resulting from a numeric formula. It it is not a numeric value, Corel Quattro Pro treats it as a string (or string value from a formula).

Example

In the following example, the \F macro passes three arguments (principal, interest, and term) to the subroutine _calc_loan, which stores the arguments in named cells and defines them as values. It then

uses the arguments to calculate the monthly payment on a loan

stores the result in a cell named amount

creates a label in a cell named payment displaying that amount as currency

returns control to the main macro

The main macro (\F) displays the result in the active cell preceded by the string "The monthly payment will be ".

\F	{_calc_loan 79500,12%,30}

_calc_loan	{DEFINE prin:value,int:value,term:value}

{LET amount,@PMT(prin,int/12,term*12)}

{CONTENTS payment,amount,9,34}{EditGoto txt_area}{RETURN}

prin	79500

int	0.12

term	30

amount	817.747

payment	$817.75

txt_area	+"The monthly payment will be "&@TRIM(payment)

Related Topics


{DEL} and {DELETE}

{DEL} and {DELETE} are equivalent to the Del key.

Related Topics


{DELETEMENU}

Syntax

{DELETEMENU MenuPath}

MenuPath	=	menu in the tree to delete; type a forward slash (/) followed by the menu name; for example, to delete the Edit menu, type /Edit.

{DELETEMENU} removes the menu specified by MenuPath from the menu system. See the description of {ADDMENU} for the syntax of MenuPath. Use {DELETEMENUITEM} to remove an individual menu command.

Tips

You cannot delete menus between Edit and Tools on the menu bar. The area between these menu positions is reserved for context-sensitive menus that change depending on the active window. You can add menu items to menus between the Edit and Tools menus, but the new menu items will be swapped out of the menu when the context changes.

Changes made to the menu system using this command are not saved; they are lost when you exit Corel Quattro Pro. Each time you run a macro containing {DELETEMENU}, the menu changes appear again.

To restore the original menu bar, use the macro command {SETMENUBAR} without an argument

Example

{DELETEMENU "/File"} removes the File menu from the active menu system.

Related Topics


{DELETEMENUITEM}

Syntax

{DELETEMENUITEM MenuPath}

MenuPath	=	menu item in the tree to delete; enter the sequence of menu commands separated by forward slashes (/); you can use <- and -> to specify an item menu at the top or  bottom of a menu, respectively. For example, /File/<- specifies the first item on the File menu. You can also use numbers to identify menu commands. For example, /File/0 specifies the first item on the File menu (the ID numbers start at zero)

{DELETEMENUITEM} removes the menu command specified by MenuPath from the menu system. Use {DELETEMENU} to remove entire menus from the active menu system.

Tips

You can delete menu items from any menu, but if you change a context-sensitive menu (all menus between Edit and Tools on the menu bar), the change only applies to the menu in the active window. For example, suppose you use a macro to change the View menu when the notebook window is active. If you then open a chart window, the chart View menu appears--without the change. If you want the change to apply to that View menu as well, you must run the macro again.

Changes made to the menu system using this command are not saved; they are lost when you exit Corel Quattro Pro. Each time you run a macro containing {DELETEMENUITEM} the menu changes appear again.

To restore the original menu bar, use the macro command {SETMENUBAR} without an argument.

Examples

{DELETEMENUITEM "/Edit/Clear"} removes the Edit [image] Clear command.

{DELETEMENUITEM "/Edit/<-"} removes the first item on the Edit menu.

Related Topics


{DELVAR}

Syntax

{DELVAR VarName1<,VarName2,...>}

VarName	=	a named variable

{DELVAR} deletes unused named variables. Named variables are used to control OLE objects. OLE objects are released from control at the end of macro execution, but named variables remain until you exit Corel Quattro Pro. You can delete the unused named variables to free an object assigned to that name, and then control the object using another macro.

Examples

{DELVAR} deletes all named variables

{DELVAR calc} deletes a named variable calc

{DELVAR calc 0, calc 1, calc 3} deletes the named variables calc 0, calc 1, and calc 3.

For more details on using {DELVAR} and other OLE automation macro commands, Using OLE Automation Features.


{DESCR}

Syntax

{DESCR InBlock, OutBlock, Grouped, <Labels(0|1)>, <Summary(0|1)>, <Largest>, <Smallest>, <Confidence>}

InBlock	=	one or more numeric cell values representing the input cells

OutBlock	=	upper left cell of the output cells

Grouped	=	"C" to group results by column or "R" to group results by row; "C" is the default

Labels	=	1 if labels are located in the first column or row of the input cells; 0 if the input cells do not contain labels; the default is 0

Summary	=	1 to display summary statistics; 0 to omit summary statistics; the default is 0

Largest	=	a value n which, if present, makes {DESCR} report the nth largest data point; if omitted, the largest data point is not reported

Smallest	=	a value n which, if present, makes {DESCR} report the nth smallest data point; if omitted, the smallest data point is not reported

Confidence	=	confidence level of the mean; the default is 0.95

{DESCR} returns a table of descriptive statistics that characterize a sample. {DESCR} is equivalent to the Descriptive Statistics analysis tool.

Related Topics


{DialogView}

Syntax

{DialogView Window}

Window	=	dialog window to make active

{DialogView} lets you edit an existing dialog box.

Related Topics


{DialogWindow.Property}

{DialogWindow.Property} is equivalent to  to right-clicking the title bar of a dialog window to set its properties.

{DialogWindow} commands affect the active dialog window. The next table lists the possible settings for Property. To display a property description with syntax, choose that property in the following list:

Dimension

Disabled

Grid_Options

Name

Position_Adjust

Title

Value

Related Topics


{DialogWindow.Dimension<.Option>}

{DialogWindow.Dimension<.Option>}

{DialogWindow.Dimension "XPos, YPos, Width, Height"}

{DialogWindow.Dimension.Height Height}

{DialogWindow.Dimension.Width Width}

{DialogWindow.Dimension.X XPos}

{DialogWindow.Dimension.Y YPos}

{DialogWindow.Dimension.Option} is equivalent to the dialog window property Dimension, which lets you move and resize the active dialog window. Each argument is specified in pixels. XPos and YPos specify the distance in pixels from the left side of the Corel Quattro Pro window and bottom of the input line, respectively.

Example

The following macro command positions the active dialog window two pixels from the left edge of the Corel Quattro Pro window, five pixels below the input line, sets the width to 150 pixels, and sets the height to 250 pixels.

{DialogWindow.Dimension "2,5,150,250"}

Related Topics


{DialogWindow.Disabled Yes|No}

{DialogWindow.Disabled Yes|No} disables (Yes) or enables (No) the active dialog box or Toolbar. This command only works when the user is viewing a dialog box or Toolbar; it does not work when editing one.

Related Topics


{DialogWindow.Grid_Options GridSize, ShowGrid, SnapToGrid}

{DialogWindow.Grid_Options GridSize, ShowGrid, SnapToGrid} sets the grid size of the active dialog window. Use GridSize to specify the distance between grid points in pixels; ShowGrid specifies whether the grid is visible; SnapToGrid specifies whether objects snap to the grid.

Example

The following macro sets the distance between grid points to 10, shows the grid, and enables it.

{DialogWindow.Grid_Options "10,Yes,Yes"}

Related Topics


{DialogWindow.Name Name}

{DialogWindow.Name Name} sets the name of the active dialog window. This name is used by macro commands, @functions, and link commands to identify the dialog box (or Toolbar).

Related Topics


{DialogWindow.Position_Adjust Depend, LeftRel, TopRel, RightRel, BottomRel, CenterHor, CenterVer}

{DialogWindow.Position_Adjust Depend, LeftRel, TopRel, RightRel, BottomRel, CenterHor, CenterVer} specifies how the active dialog box resizes when the Corel Quattro Pro window is resized. The arguments are equal to options in the Position Adjust dialog box; click here [image] for directions on using the Position Adjust property.

Related Topics


{DialogWindow.Title String}

{DialogWindow.Title String} specifies the title that appears on the dialog box when the user is viewing it (the title does not appear when editing the dialog box).

Related Topics


{DialogWindow.Value String}

{DialogWindow.Value String} sets the initial settings of the dialog box (or Toolbar). You can use it with @COMMAND to find the current settings of the dialog box. String is a comma separated list of settings. Each setting sets the initial value of one control. Control values appear in this list if their Process Value property is set to Yes. You can set the order of the settings while editing the dialog box.

Example

The following macro command sets the initial values of a dialog box with three controls. Each setting maps to one control.

{DialogWindow.Value "25000,5,1st of month"}

Related Topics


{DISPATCH}

Syntax

{DISPATCH Location}

Location	=	a single cell containing the address or cell name of another macro

{DISPATCH} is similar to {BRANCH}, except it uses Location differently:

If Location is a cell address or one named cell, {DISPATCH} branches to the address stored in that cell.

If Location is a text formula resulting in a cell or one named cell, {DISPATCH} branches to the address stored in that result address. (In Quattro Pro DOS, {DISPATCH} branches to the actual result address.)

If Location contains cells or a text formula resulting in cells, {DISPATCH} branches to the first cell of those cells.

{DISPATCH} is useful when you want to branch to one of several alternative macros, depending on circumstances. You can also set up a macro that modifies the contents of Location, depending on user input or test conditions.

Example

The macro _continue in the following example uses {DISPATCH jump_cell} to create a form letter that changes depending on the result of a credit check.

Type the line to the right of \F with no hard returns until after the first {BRANCH _continue}, then press Enter to insert the text into one cell.

credit	OK

\F	{EditGoto text_area}

{IF credit="OK"}{LET jump_cell,"_ok_note"}{BRANCH _continue}

{LET jump_cell,"_bum_note"}{BRANCH _continue}

_continue	{PUTCELL "Because of your current standing with P.K."}

{DOWN}

{PUTCELL "Finance, we have decided to"}{DOWN}

{DISPATCH jump_cell}

jump_cell	_ok_note

_ok_note	{PUTCELL "extend your credit limit."}{DOWN 2}

{BRANCH _finish}

_bum_note	{PUTCELL "CANCEL your account."}{DOWN 2}

{BRANCH _finish}

_finish	{PUTCELL "Please call our office for details."}

{DOWN 2}

{PUTCELL "Sincerely,"}

{DOWN 3}

{PUTCELL "James Madison (Account Officer)"}

{DOWN}

text_area	Because of your current standing with P.K.

Finance, we have decided to

extend your credit limit.

Please call our office for details.

Sincerely,

James Madison (Account Officer)

Related Topics


{DLL}

Syntax

{DLL <DLLName.>FunctionName, Argument1, Argument2,...}

DLLName	=	the name of a DLL file (if not already loaded)

FunctionName	=	the name of an @function contained in the DLL

Argument1,Argument2...	=	arguments to the @function

{DLL} runs a macro or returns a value from an add-in @function contained in a dynamic-link library file. The @function can have up to 16 arguments.

Example

This statement calls the @function AMPLITUDE, included in the DLL Math, with two selections as arguments:

{DLL Math.AMPLITUDE,A1..A10,B1..B10}

Related Topics


{DLL.Load}

Syntax

{DLL.Load DLLName}

DLLName	=	the name of a DLL file to load

{DLL.Load} loads a dynamic-link library (DLL) program. You can use {DLL.Load} to load a DLL containing add-in @functions or macros. When the DLL is loaded, you can reference add-in @functions contained in the DLL without typing the DLL name. Similarly, macros contained in the DLL become resident in memory.

You can use {DLL.Load} to define a startup macro in QPW.INI.

Example

{DLL.Load MYDLL} loads a DLL program named MYDLL

Related Topics


{DODIALOG}

Syntax

{DODIALOG DialogName, OKExit?, <Arguments>, <MacUse?>}

DialogName	=	name of dialog box to display

OKExit?	=	cell to store how the dialog box closed (1 for OK, 0 for Cancel)

Arguments	=	cells to store the initial settings for controls in the dialog box and their final settings (optional)

MacUse?	=	1 if the user should manipulate the dialog box, 0 if the macro manipulates it (optional; 1 is the default)

{DODIALOG} displays a dialog box for the user or the macro to manipulate. MacUse? specifies how the dialog box is manipulated; if 0, the macro manipulates the dialog box, if 1, the macro pauses so the user can manipulate the dialog box.

DialogName is the name of the dialog box to display. Arguments refers to the cells containing initial settings for controls in the dialog box. Each cell in Arguments corresponds to one control in the dialog box with a Process Value property set to Yes; the order of controls in the dialog box determines which cell maps to which control (the first cell maps to the first control, the second cell maps to the second, and so on).

If a dialog box is under macro control (MacUse? set to 0), you can make it revert to user control using {PAUSEMACRO}.

Once the dialog box closes (performing its function), Corel Quattro Pro writes the new control settings into their respective cells. OKExit? is a cell containing the result of the dialog box operation; 1 if OK was chosen, 0 if the dialog box was canceled.

Related Topics


{DOWN} and {D}

Syntax

{DOWN <Number>} or {D <Number>}

Number	=	any positive integer (optional)

{DOWN} and {D} are equivalent to the Down key. The optional argument Number moves the selector down the corresponding number of rows. You can also use cell references or cell names as arguments.

Examples

{DOWN}{DOWN}	moves the selector down two rows.

{DOWN 4}	moves the selector down four rows.

{DOWN G13}	moves down the number of rows specified in cell G13.

{DOWN count}	moves down the number of rows specified in the first cell of the named area "count".

Related Topics


{DraftViewGoto}

Switches from either the Objects Sheet or the sheet in Page View mode to Draft View. Equivalent to View [image] Draft.

Related Topics


{DUPLICATE}

Syntax

{DUPLICATE xoffset, yoffset}

xoffset	=	offset from the left edge of UpperCell to the left edge of the floating object

yoffset	=	offset from the top edge of UpperCell to the top edge of the floating object

{DUPLICATE} copies selected chart annotations or dialog box controls. If no object is selected, {DUPLICATE} does nothing.

xoffset and yoffset are measured in relative coordinates for objects in a chart window, and in pixels for dialog box objects.

Examples

The following macro activates a floating chart for editing, creates a rectangle in the chart, makes a copy of the rectangle, then deactivates editing.

{GraphEdit Chart1, 1}

{CreateObject Rect,147,176,416,427}

{Duplicate 269,338}

{GraphDeactivate}


{EDIT}

{EDIT} is equivalent to the Edit key, F2. Its main use is in Edit mode, where it lets you edit the contents of the active cell. You can also use it to search for items in a long list.

Related Topics


{EditClear}

{EditClear} is the command equivalent for Edit [image] Clear [image] Cells. It erases the contents and properties of the current cells, deletes selected objects from dialog and chart windows, and deletes selected floating objects. To erase cells while leaving their properties intact, use {ClearContents}.

Related Topics


{EditCopy}

{EditCopy} is the command equivalent for Edit [image] Copy. It copies the selected object to the Clipboard.

Related Topics


{EditCut}

{EditCut} is the command equivalent for Edit [image] Cut. It removes the selected object from the spreadsheet and moves it to the Clipboard.

Related Topics


{EditGoto}

Syntax

{EditGoto Block,<Extend?(0|1)>}

Block	=	cells to display and select

Extend?	=	whether to extend the selection from the current selection to the specified cells; 0 = no, 1 = yes; the default is 0

{EditGoto} is the command equivalent for Edit [image] Go To. It selects and displays Block within spreadsheet sheets, but not the Objects sheet.

You can use {EditGoto?} or {EditGoto!} to display the Go To dialog box. {EditGoto?} lets the user manipulate the dialog box, whereas {EditGoto!} relies on the macro to manipulate it.

Related Topics


{EditPaste}

{EditPaste} is the command equivalent for Edit [image] Paste. It copies data and its properties from the Clipboard into the notebook.

To paste only values or properties, use {PasteSpecial}. {PasteLink} creates a live DDE link, and {PasteFormat} adds many types of data from other applications (including embedded OLE objects).

Related Topics


{END}

{END} is equivalent to the End key.

Related Topics


{ESC} and {ESCAPE}

{ESC} and {ESCAPE} are equivalent to the Esc key, which is useful for clearing menus or dialog boxes from the screen, one at a time. To clear all prompts and return Corel Quattro Pro to Ready Mode, use {BREAK}.

Related Topics


{EXEC}

Syntax

{EXEC AppName, WindowMode, <ResultLoc>}

AppName	=	name (in quotes) of the application to run (up to 100 characters)

WindowMode	=	size state of the application's window: 1 or 101 for normal size, 2 or 102 for minimized, 3 or 103 for maximized; use 101, 102, 103 to suspend macro execution until the application terminates

ResultLoc	=	cell containing the coded explanation of the operation's success

{EXEC} lets you run other Windows applications or DOS commands. AppName can be any valid command string you could type in the Windows Run dialog box. AppName can contain the path of the application. If no path is given, then the application must be in the system path so Windows can find it.

ResultLoc is useful in some cases where the started application supports DDE along with an instance number. For example, Excel and Corel Quattro Pro respond to their names and also respond to their names concatenated with an instance number.

Examples

{EXEC "C:\COREL\SUITE8\PROGRAMS\WPWIN8.EXE",2} runs Corel WordPerfect for Windows as a minimized application

{EXEC "NOTEPAD.EXE",1} runs the Windows Notepad and displays it just as if it were run from the Start button on the taskbar.

{EXEC "C:\COMMAND.COM /C DIR>TEST.TXT",1} stores the current directory listing in the file TEST.TXT for Windows, except for Windows NT 4.0.

{EXEC "C:\CMD.EXE /C DIR>TEST.TXT",1} stores the current directory listing in the file TEST.TXT in Windows NT 4.0.

Related Topics


{EXECAUTO}

Syntax

{EXECAUTO AutoExpr1<,AutoExpr2>}

AutoExpr1,2...	=	one or more automation expressions

{EXECAUTO} executes one or more methods in another application, but drops any return values.

Examples

{EXECAUTO calc.Display()} asks DispCalc to display its current input value.

{EXECAUTO calc.Button(A1), calc.Display()} passes the value in A1 as an input to DispCalc and asks DispCalc to diplay it.

For more details on using {EXECAUTO} and other OLE automation macro commands, Using OLE Automation Features.


{EXECUTE}

Syntax

{EXECUTE DDEChannel,Macro,<ResultLoc>}

DDEChannel	=	channel ID number of the application to run a macro in

Macro	=	string containing the macro command(s) to run

ResultLoc 	=	a cell indicating the result of the operation

With {EXECUTE} you can make other applications that support DDE run their macros. The macro to run is stored in the string Macro. It must be in the syntax the application normally uses (refer to the documentation for each application). You must open a channel of conversation with the other application using {INITIATE} (which determines the value of DDEChannel) before using {EXECUTE}.

The contents of ResultLoc depend on the application you are contacting. Most often, if a macro succeeds, ResultLoc contains 1. If a macro fails, {EXECUTE} results in an error.

See {REQUEST} and {POKE} for more information on receiving data from and sending data to other applications using DDE.

Example

The following example initiates a DDE conversation with Corel WordPerfect's macro server and opens REPORT.DOC in Corel WordPerfect.

channel	1

{INITIATE "WPWin7_Macros","COMMANDS",channel}

{EXECUTE channel,"FileOpen(""report.doc"")"}

{TERMINATE channel}

Related Topics


{EXPON}

Syntax

{EXPON InBlock,OutBlock,<Damping>,<StdErrs>}

InBlock	=	input cells containing a single column or row with at least four numeric values; the cells must not contain labels

OutBlock	=	upper left cell of the output cells

Damping	=	damping factor used as the exponential smoothing constant; indicates the percentage for error to adjust each prior forecast value; must be ≥ 0; the default is 0.3

StdErrs	=	flag indicating whether standard errors are included in the output table: yes (1) or no (0); the default is 0

{EXPON} performs exponential smoothing on a series of values. {EXPON} is equivalent to the Exponential Smoothing analysis tool.

Related Topics


{ExportGraphic}

Syntax

{ExportGraphic Filename,<GrayScale?(0|1)>,<Compression?(0|1)>}

Filename	=	name of the graphic file to export

GrayScale?	=	whether to gray-scale: no (0), yes (1); the default is 0

Compression?	=	type of .TIF file compression to use: none (0) or PackBits (1); the default is 0

{ExportGraphic} is the command equivalent for Chart [image] Export to File. It saves selected graphic objects to one of several file types with optional gray-scaling and compression.

You can use {ExportGraphic?} or {ExportGraphic!} to display the Export Graphics File dialog box. {ExportGraphic?} lets the user manipulate the dialog box, whereas {ExportGraphic!} relies on the macro to manipulate it.

Related Topics


{FileClose} and {FileCloseAll}

Command equivalent	Equivalent to ...
{FileClose <DoSave? (0|1)>}	File [image] Close
{FileCloseAll <DoSave? (0|1)>}	no equivalent
{FileClose} closes all views of the active notebook; {FileCloseAll} closes all open notebooks. The optional argument DoSave? indicates whether to display a save prompt before closing files with changes. Use 1, the default, to prompt for changes; 0 suppresses save prompts.

Related Topics


{FileCombine}

Syntax

{FileCombine Filename, <Blocks>, Add | Subtract | Multiply | Divide | Copy}

Filename	=	name of the file to combine

Blocks	=	selection or selections within Filename to combine (optional)

{FileCombine} is the command equivalent for Tools [image] Data Tools [image] Combine Files. If you use the "Copy" option, it copies all or part of a notebook into the active notebook (starting at the selected cell). Omit Blocks to combine an entire file. Use "Add", "Subtract", "Multiply", or "Divide" to perform mathematical operations; the incoming data operates on existing data.

You can use {FileCombine?} or {FileCombine!} to display the Combine Files dialog box. {FileCombine?} lets the user manipulate the dialog box, whereas {FileCombine!} relies on the macro to manipulate it.

Related Topics


{FileExit}

Syntax

{FileExit <DoSave?(0|1)>}

DoSave?	=	whether to display a save prompt for modified files: no (0), yes (1); 1 is the default

{FileExit} is the command equivalent for File [image] Exit. It closes Corel Quattro Pro. The optional argument DoSave? indicates whether to display a save prompt before closing files with changes. Use 1, the default, to prompt for changes; 0 suppresses save prompts.

Related Topics


{FileExtract Formulas|Values, <,Replace|Backup|Confirm>}
{FileExtract}

Syntax

{FileExtract Formulas | Values, Blocks, Filename, <Replace | Backup | Confirm>}

Blocks	=	selection or selections to extract

Filename	=	name of the new file containing Blocks

{FileExtract} is the command equivalent for Tools [image] Data Tools [image] Extract to File. It saves part of a notebook to a separate file, leaving the original file intact. Use "Formulas" to retain formulas; use "Values" to convert formulas to values. The optional argument--"Replace", "Backup", or "Confirm"--indicates how to treat an existing file with the same name (without displaying a prompt).

You can use {FileExtract?} or {FileExtract!} to display the Extract To File dialog box. {FileExtract?} lets the user manipulate the dialog box, whereas {FileExtract!} relies on the macro to manipulate it.

Related Topics


{FileImport}

Syntax

{FileImport "Filename","ASCII Text File"|"Comma and "" Delimited File"|"Only Commas"|"Parse Expert"}

{FileImport} copies a text file into the active sheet of a notebook. Enter the option string that describes the type of file to import.

You can use {FileImport?} or {FileImport!} to display the Text Import dialog box. {FileImport?} lets the user manipulate the dialog box, whereas {FileImport!} relies on the macro to manipulate it.

Related Topics


{FileNew}

Syntax

{FileNew <TemplateName>}

TemplateName	=	the name of a QuickTemplate, as indicated in the Title box in File [image] Properties [image] Summary.

{FileNew} is the command equivalent for File [image] New. It opens a blank notebook or a notebook based on a QuickTemplate.

You can use {FileNew?} or {FileNew!} to display the New File dialog box. {FileNew?} lets the user manipulate the dialog box, whereas {FileNew!} relies on the macro to manipulate it.

FileNew only opens templates in the folder indicated in Tools [image] Settings [image] File Options [image] QuickTemplates.

Examples

The following macro opens a blank notebook:

{FileNew}

The following macro opens a new notebook based on the 7 Year Balloon Loan QuickTemplate:

{FileNew "7 Year Balloon Loan"}

Related Topics


{FileOpen}

Syntax

{FileOpen Filename,<"Open Supporting"|"Update References"|"None ", Open as Copy 0|1>}

Filename	=	name of the file to open

Open as Copy	=	Yes or No, (1 or 0), 0 is the default.

{FileOpen} is the command equivalent for File [image] Open. It opens the specified file.

You can use {FileOpen?} or {FileOpen!} to display the Open File dialog box. {FileOpen?} lets the user manipulate the dialog box, whereas {FileOpen!} relies on the macro to manipulate it.

Related Topics


{FileRetrieve}

Syntax

{FileRetrieve Filename, <"Open Supporting" | "Update References" |"None ">}

Filename	=	name of the file to retrieve

{FileRetrieve} loads a notebook into the active notebook, replacing any existing data there.

You can use {FileRetrieve?} or {FileRetrieve!} to display the Retrieve File dialog box. {FileRetrieve?} lets the user manipulate the dialog box, whereas {FileRetrieve!} relies on the macro to manipulate it.

Related Topics


{FileSave}, {FileSaveAll}, and {FileSaveAs}

Command equivalent	Equivalent to...
{FileSave <Replace|Backup|Confirm>}	File [image] Save
{FileSaveAll <Replace|Backup|Confirm>}	no equivalent
{FileSaveAs Filename, <Replace | Backup | Confirm>,, <FileType>}	File [image] Save As
{FileSave} saves the active notebook, {FileSaveAll} saves all open notebooks, and {FileSaveAs} lets you save the active notebook under another name (Filename). The optional argument--"Replace", "Backup", or "Confirm"--indicates how to treat a previous version of the file (without displaying a prompt).

The optional <FileType> argument for {FileSaveAs} specifies the type of file to save and is equivalent to the Save File As Type option in the Save File dialog box. If you do not specify a file type, the default is "QPW v6".

You can use {FileSaveAs?} or {FileSaveAs!} to display the Save File dialog box. {FileSaveAs?} lets the user manipulate the dialog box, whereas {FileSaveAs!} relies on the macro to manipulate it.

The following table shows the available file types. For file types with abbreviated names, a short description is provided.

File Types	Description

QPW v7/v8	Corel Quattro Pro for Windows, version 7.0 and 8.0

QPW v6	Corel Quattro Pro for Windows, version 6.0

QPW	Corel Quattro Pro for Windows, version 1.0 and 5.0

QP/DOS	Corel Quattro Pro for DOS

Excel v5/v7	Excel, Version 5.0 and Version 7.0

Excel	Excel, Version 4.0

1-2-3 v4/v5	1-2-3, Version 4 and Version 5

1-2-3 v3.x	1-2-3, Version 3x

1-2-3 v2.x	1-2-3, Version 2x

1-2-3 v1.0	1-2-3, Version 1.0

1-2-3 Ed.	1-2-3, Educational Version

Paradox

dBASE IV

dBASE III

dBASE II

Text	tab-delimited text

DIF	VisiCalc

SYLK	Multiplan

HTML	Hypertext Markup Language files, Version 3 (for distribution on the Internet's World Wide Web)

Example

To close all files and save without confirmation, use this macro:

{FileSaveAll Replace}

{FileCloseAll 0}

Related Topics


{FileSend}

Command equivalent	Equivalent to

{FileSend <Filename>}	File [image] Send To [image] Mail

{FileSend} is the command equivalent for File [image] Send To [image] Mail, which lets you send notebook sheets via one of your mail systems.

Example

{FileSend MYSTATUS.WB3} sends the notebook MYSTATUS.WB3 to another user.

Related Topics


{FILESIZE}

Syntax

{FILESIZE Location}

Location	=	any cell address or cell name

{FILESIZE} calculates the number of bytes in a file previously opened using {OPEN} and places the result in Location as a value. If Location refers to cells, the result is placed in the upper left cell of the cells. If the command is successful, macro execution continues in the cell below the cell containing the {FILESIZE} command, ignoring any other commands in that cell. If {FILESIZE} fails (for example, when no file is open), macro execution continues in the cell containing the {FILESIZE} command.

Example

The following example opens the file MYFILE.TXT and places its size (in bytes) in the cell named num_bytes.

\F	{OPEN "MYFILE.TXT",R}

{FILESIZE num_bytes}

{CLOSE}

num_bytes	45

Related Topics


{ FileVersion.Retrieve }

Syntax

{FileVersion.Retrieve Filename}

Equivalent to File  [image] Version Control [image] Retrieve Notebook.


{ FileVersion.Retrieve_Current }

Syntax

{FileVersion.Retrieve_Current}

Equivalent to File [image] Version Control [image] Retrieve Current.


{ FileVersionSave }

Syntax

{FileVersionSave}

Equivalent to File [image] Version Control [image] Update Current.


{FLOATCOPY}

Syntax

{FLOATCOPY UpperCell, xoffset, yoffset}

UpperCell	=	cell containing the new upper left corner of the floating object

xoffset	=	offset in twips from the left edge of UpperCell to the left edge of the floating object

yoffset	=	offset in twips from the top edge of UpperCell to the top edge of the floating object

{FLOATCOPY} lets you copy a floating object in the active notebook window. The item to copy is selected using {SELECTFLOAT}. The new position in {FLOATCOPY} is specified as a positive offset from a cell in the notebook.

To copy a floating chart to another notebook, specify a notebook as well as a cell for UpperCell.

Examples

The following macro selects the floating chart Inserted1 and copies it to [SALES]A:C10.

{SELECTFLOAT Inserted1}

{FLOATCOPY [SALES]A:C10,0,0}

Related Topics


{FLOATCREATE}

Syntax

{FLOATCREATE Type, UpperCell, xoffset, yoffset, LowerCell, xoffset2, yoffset2, <Text>|StartCorner}

Type 	=	floating object to create: Chart, Button, Line, Arrow, Rect, Rounded_Rect, Ellipse, or Text

UpperCell	=	cell containing the upper left corner of the chart or macro button

xoffset	=	offset in twips from the left edge of UpperCell to the left edge of the floating object

yoffset	=	offset in twips from the top edge of UpperCell to the top edge of the floating object

LowerCell	=	cell containing the lower right corner of the chart or macro button

xoffset2	=	offset in twips from the left edge of LowerCell to the right edge of the floating object

yoffset2	=	offset in twips from the top edge of LowerCell to the bottom edge of the floating object

Text	=	for Chart, the named chart to display; for Button, the button text

StartCorner	=	for Line or Arrow, a number representing the starting corner; 1 = northwest, 2 = northeast, 3 = southeast, 4 = southwest (for example, an arrow pointing up and to the right would have a StartCorner of 4)

{FLOATCREATE} lets you create macro buttons, floating charts, or a draw layer objects (lines, arrows, rectangles, rounded rectangles, ellipses, or text boxes) in the active notebook window. Use {CREATEOBJECT} to create objects in dialog windows or chart windows.

All positions in {FLOATCREATE} are positive offsets from cells in the notebook containing the upper left and lower right corners of the object.

If you need to modify the floating object after creating it, change the property settings immediately after creation. It is selected then, so you will not need to click it or use {SELECTFLOAT}. You might also want to change the name at this time and document it for later use with {SELECTFLOAT}.

Example

The following macro creates a macro button that covers the cells A1..B2, then stores the name of the button in A26. The button reads Save File:

{FLOATCREATE Button,A1,0,0,C3,0,0, "Save File"}

{GETPROPERTY A26, "Object_Name"}

The following macro creates a button 50 twips to the right and 50 twips below the upper left corner of the button in the previous example. It reads Open File:

{FLOATCREATE Button,A1,50,50,C3,50,50, "Open File"}

The following macro creates a floating chart that is offset 35 twips from the cells C2..E10, but the same size:

{GraphNew Chart3}

{FLOATCREATE Chart,C2,35,35,E10,35,35,"Chart3"}

The following macro creates a floating arrow over the cells B8..Dll . The arrow starts at the southwest corner of the cells, and ends with an arrowhead at the northwest corner.

{FloatCreate Arrow,A:B8,0,0,A:D11,945,45,4}

The following macro creates a floating ellipse over the cells E10..E13, then fills the ellipse with a red color.

{FloatCreate Ellipse,A:E10,0,120,A:E13,945,240}

{Setproperty Fill_Color, "255,0,0"}

Related Topics


{FLOATMOVE}

Syntax

{FLOATMOVE UpperCell,xoffset,yoffset}

UpperCell	=	cell containing the new upper left corner of the floating object

xoffset	=	offset in twips from the left edge of UpperCell to the left edge of the floating object

yoffset	=	offset in twips from the top edge of UpperCell to the top edge of the floating object

{FLOATMOVE} lets you move a floating object in the active notebook window. The item to move is selected using {SELECTFLOAT}. The new position in {FLOATMOVE} is specified as a positive offset from a cell in the notebook.

To move a floating chart to another notebook, specify a notebook as well as a cell for UpperCell.

Examples

The following macro selects the floating chart Inserted1 and moves it to [SALES]A:C10.

{SELECTFLOAT Inserted1}

{FLOATMOVE [SALES]A:C10,0,0}

Related Topics


{FloatOrder.Option}

Command equivalent	Equivalent to Format [image] Object Order...

{FloatOrder.ToBack}	... Send To Back

{FloatOrder.Backward}	... Send Backward

{FloatOrder.ToFront}	... Bring To Front

{FloatOrder.Forward}	... Bring Forward

{FloatOrder.Option} is the command equivalent for Format [image] Object Order. It works on selected objects to arrange layers of floating charts and other floating objects in the notebook window.

Related Topics


{FLOATSIZE}

Syntax

{FLOATSIZE UpperCell,xoffset,yoffset,LowerCell,xoffset2,yoffset2}

UpperCell	=	cell containing the new upper left corner of the chart or macro button

xoffset	=	offset in twips from the left edge of UpperCell to the left edge of the floating object

yoffset	=	offset in twips from the top edge of UpperCell to the top edge of the floating object

LowerCell	=	cell containing the new lower right corner of the chart or macro button

xoffset2	=	offset in twips from the left edge of LowerCell to the right edge of the floating object

yoffset2	=	offset in twips from the top edge of LowerCell to the bottom edge of the floating object

{FLOATSIZE} lets you resize a floating object in the active notebook window. The item to resize is selected using {SELECTFLOAT}.

All positions in {FLOATSIZE} are positive offsets from a cell in the notebook.

Related Topics


{FLOATTEXT}

Syntax

{FLOATTEXT String}

String	=	string of characters used to replace text in the text box

{FLOATTEXT} replaces the text in the selected text box with the specified string. The text box can be on a notebook sheet or in a chart window.

Examples

The following macro selects a floating text box named Text1 and replaces the text in it with "Quarterly Sales Report".

{SELECTFLOAT Text1}

{FLOATTEXT "Quarterly Sales Report"}

Related Topics


{FOR}

Syntax

{FOR CounterLoc,Start#,Stop#,Step#,StartLoc}

CounterLoc	=	cell used to track the number of macro iterations

Start#	=	initial value to place in CounterLoc

Stop# 	=	maximum value for CounterLoc

Step# 	=	amount added to CounterLoc after each iteration

StartLoc	=	cell containing the subroutine to run

{FOR} repeatedly runs a macro subroutine beginning at StartLoc, creating a macro loop. Corel Quattro Pro keeps track of how long the macro runs using CounterLoc. At the start of the loop, CounterLoc is set to Start#. Each time an iteration of the loop runs, CounterLoc is increased by Step#. When CounterLoc reaches or exceeds Stop#, execution stops.

Examples

{FOR D15,1,5,1,E30}	runs the subroutine beginning in cell E30 five times.

{FOR D15,1,10,2,E30}	runs the subroutine five times because the counter increments by two during each iteration.

{FOR D15,1,5,0,E30}	runs the subroutine continuously until you press Ctrl+Break, because adding 0 to the start value of 1 can never make the counter exceed 5.

{FOR D15,1,0,1}	results in an error because no subroutine is specified.

The following macro creates "Qtr" labels for reports; the year displays above Qtr1:

\Q	{; position cursor where labels should appear}

{FOR counter, 1994,1997,1,_list}

{; return to original position}

{LEFT}{END}{LEFT}

counter

_list	{PUTCELL +counter}

{DOWN}

{PUTCELL "Qtr1"}{RIGHT}

{PUTCELL "Qtr2"}{RIGHT}

{PUTCELL "Qtr3"}{RIGHT}

{PUTCELL "Qtr4"}{RIGHT 2}{UP}

Related Topics


{FORBREAK}

{FORBREAK} cancels the subroutine run by a {FOR} command and ends the processing of {FOR}. Macro execution continues normally with the command following the {FOR} command.

If {FORBREAK} appears anywhere other than in a subroutine called by {FOR}, macro execution ends, and Corel Quattro Pro displays an error message.

{FORBREAK} is usually used in conjunction with {IF} to exit the macro if a specific condition is reached; for example, if an error condition is found.

Example

The following example shows {FORBREAK} terminating a loop used to enter names into a list. Enter STOP to stop the loop.

\F	{EditGoto list_top}

{FOR counter,1,10000,1,_get_name}

_get_name	{GETLABEL "Enter next name: ",name_cell}

{IF name_cell="STOP"}{FORBREAK}

{LET @CELLPOINTER("Address"),name_cell}{DOWN}

name_cell	STOP

counter	4

list_top

Related Topics


{FOURIER}

Syntax

{FOURIER InBlock,OutBlock,<Inverse>}

InBlock	=	one or more numeric cell values representing the input cells; can be real or complex numbers; the number of values in InBlock must be a power of 2 between 2 and 1024 inclusive (for example, 2, 4, 8, 16,...); if the number of values in InBlock does not equal a power of 2, pad the cells with additional zeros

OutBlock	=	upper left cell of the output cells

Inverse	=	0 to perform a Fourier transformation; 1 to perform the inverse Fourier transformation; the default is 0

{FOURIER} performs a fast Fourier transformation on cells of data. {FOURIER} is equivalent to the Fourier analysis tool.

Related Topics


{Frequency.Option}

Command Equivalent	Equivalent to Tools [image] Numeric Tools [image] Frequency...
{Frequency.Bin_Block Block}	... Bin Cells
{Frequency.Go}	... OK
{Frequency.Reset}	... Reset
{Frequency.Value_Block Block}	... Value Cells
{Frequency.Option} is the command equivalent for Tools [image] Numeric Tools [image] Frequency. It counts the number of cases in the value Block that fall within each interval specified in the bin Block. Use {Frequency.Bin_Block} and {Frequency.Value_Block}, then {Frequency.Go}. You can use {Frequency.Reset} before or after the other commands to clear current settings.

You can use {Frequency?} or {Frequency!} to display the Frequency Tables dialog box. {Frequency?} lets the user manipulate the dialog box, whereas {Frequency!} relies on the macro to manipulate it.

Example

The following macro counts the data in cells C1..E13 of sheet A and groups it according to the intervals given in G1..G7; frequencies display in column H.

{Frequency.Value_Block A:C1..E13}

{Frequency.Bin_Block A:G1..G7}

{Frequency.Go}

Related Topics


{FTESTV}

Syntax

{FTESTV InBlock1,InBlock2,OutBlock,<Labels>}

InBlock1	=	the first input cells containing a column or row of numeric values

InBlock2	=	the second input cells containing a column or row of numeric values

OutBlock	=	upper left cell of the output cells

Labels	=	1 if labels are located in the first column or row of the input cells; 0 if the input cells do not contain labels; the default is 0

{FTESTV} performs a two-sample F-test to compare population variances. {FTESTV} is equivalent to the F-Test analysis tool.

Related Topics


{FUNCTIONS}

{FUNCTIONS} is equivalent to the Functions key, Alt+F3, which displays a list of @functions to enter in the input line.

Related Topics


{GET}

Syntax

{GET Location}

Location	=	cell in which to store the keystroke entered by the user

{GET} pauses macro execution, accepts one keystroke from the user (no carriage return is necessary), and stores the keystroke as a macro command in Location. It then continues macro execution. Any Corel Quattro Pro keystroke can be recorded with {GET} except Shift+F2, Pause, Caps Lock, Num Lock, and Scroll Lock. Unlike { ? }, the keystroke is not passed to Corel Quattro Pro.

{GET} is useful for creating macros that run in the background while the user works. It can detect each key, and restrict the actions the user performs. You can use {LOOK} with {GET} to check the typeahead buffer for user response.

Example

The following example asks users if they want to continue.

\F	{RIGHT 10}

{; display msg_area in top left of screen}

{GOTO}msg_area~

_again	Press Y to continue...~

{GET keystroke}

{IF keystroke<>"Y"}{BEEP2}{HOME}{QUIT}

{BEEP 4}{BRANCH _again}

keystroke

msg_area	Press Y to continue...

Related Topics


{GETDIRECTORYCONTENTS}

Syntax

{GETDIRECTORYCONTENTS Block,<Path>}

Block	=	cells to enter list of files into

Path	=	path and wildcard specifying the list (optional)

{GETDIRECTORYCONTENTS} enters an alphabetized list of file names (determined by the path and DOS wildcard specified by Path) into Block; if Path is not included, {GETDIRECTORYCONTENTS} lists all the files in the current directory. Path must contain a DOS wildcard like *.BAT or *.*.

Tip

If Block is one cell, {GETDIRECTORYCONTENTS} overwrites any information beneath the cell (if it finds more than one file). To restrict the file names to specific cells, set Block to more than one cell.

Examples

{GETDIRECTORYCONTENTS A2,"C:\*.*"} fills column A (starting at row 2) with a list of the files in the root directory of drive C.

{GETDIRECTORYCONTENTS A2..C7,"C:\COREL\SUITE8\*.*"} fills the cells A2..C7 with a list of the files in the Corel Quattro Pro directory on drive C. The first filename is stored in A2, the second in B2, and so on. If more than 18 files are found, the cells are only filled with the first 18.

{GETDIRECTORYCONTENTS C7,"C:\COREL\SUITE8\SAMPLES\*.W??"} fills column C (starting at row 7) with a list of the files in the COREL\SUITE8\SAMPLES directory on drive C that have file extensions beginning with W.

Related Topics


{GETLABEL}

Syntax

{GETLABEL Prompt,Location}

Prompt	=	string displayed to the user as a prompt

Location	=	cell in which to store the user's response; when {GETLABEL} is used in OLE automation, Location can also be a named variable

{GETLABEL} pauses macro execution, displays Prompt in a dialog box, and accepts keystrokes until the user chooses OK or presses Enter. At that time, Corel Quattro Pro stores the characters typed as a label in Location. Unlike {GET}, it does not accept Corel Quattro Pro's special keys (for example, Home).

Prompt can be a literal string, such as "Enter date:", or a text formula such as +B6 (which contains a label). The prompt string itself can be up to 70 characters long, and is truncated if longer. The response can be as long as 160.

If {PANELOFF} is in effect, {GETLABEL} ignores it, letting the menus, status line, and input line be viewed and updated as the input is typed. Once input is completed (indicated by Enter or choosing OK), then these portions of the display are turned off again.

Examples

This example displays the label in B6 as the dialog box prompt, and then stores the result in cell D1:

{GETLABEL +B6,D1}

The following example stores the user's last name in the cell named last_cell:

\F	{GETLABEL "Enter your last name:",last_cell}

last_cell

Related Topics


{GETNUMBER}

Syntax

{GETNUMBER Prompt,Location}

Prompt	=	string displayed to the user as a prompt

Location	=	cell in which to store the user's response; when {GETNUMBER} is used in OLE automation, Location can also be a named variable

{GETNUMBER} is like {GETLABEL}, but accepts only a numeric value, a formula resulting in a numeric value, or the cell address or cell name of a cell returning a value. If a text value is input, ERR is entered in the cell. The prompt can be up to 70 characters long, and the response can be as long as 160 characters.

Example

The following example stores the user's age in the cell named age_cell. If a number is not entered, which the macro detects by checking to see whether age_cell contains ERR, it prompts again.

\F	{GETNUMBER "Enter your age:",age_cell}

{IF @ISERR(age_cell)}{BRANCH \F}

age_cell

Related Topics


{GETOBJECTPROPERTY}

Syntax

{GETOBJECTPROPERTY Cell,Object.Property}

Cell	=	cell in which to store the property setting

Object	=	name of the object to study

Property	=	property of the object to study

{GETOBJECTPROPERTY} lets you view objects in Corel Quattro Pro without using the mouse, including objects normally not selectable (like the application title bar). Selectable objects, such as blocks and annotations, can also be studied with {GETPROPERTY}. See {SETOBJECTPROPERTY} for the syntax of Object.Property.

Examples

{GETOBJECTPROPERTY A23,"Active_Notebook.Zoom_Factor"} stores the Zoom Factor property's current setting in cell A23.

{GETOBJECTPROPERTY B42,"/File/Exit.Enabled"} stores whether File [image] Exit is operational or not in the cell B42.

Related Topics


{GETPOS}

Syntax

{GETPOS Location}

Location	=	cell in which to store the retrieved value

{GETPOS} places the position of the file pointer in Location as a value. If no file has been opened using {OPEN}, the command is ignored.

The file pointer is a number corresponding to the position at which the next character written to the file will be placed. If the file pointer is 0, the next character written to the file with {WRITE} or {WRITELN} is placed at the beginning of the file. If the file already contains information, it is overwritten, beginning at the first position in the file. After the file is written to, the file pointer is positioned immediately after the last character written. If a file is newly created, then written to for the first time, the file pointer will be the size of the file.

If {GETPOS} succeeds, macro execution continues in the cell below the cell containing the {GETPOS} command, ignoring any commands in the same cell as {GETPOS}; if {GETPOS} fails, macro execution continues in the same cell.

Example

The following example opens the text file TEST.TXT, reads in a line, and calculates the length of the line by subtracting the starting position from the ending position and subtracting 1 from the result. This adjustment is necessary because the carriage return and linefeed characters (found at the end of each line in a typical text file) are stripped away by Corel Quattro Pro when the text is read into cells. So, the calculated length is one character longer than the actual length. The text file read here was created by the macro example provided in the {WRITELN} command description.

\F	{OPEN "A:TEST.TXT",R}

{GETPOS start}

{READLN input}

{GETPOS end}

{CLOSE}

{LET num_char,+(end-start)-1}

input	This is a short line.

start	0

end	22

num_char	21

Related Topics


{GETPROPERTY}

Syntax

{GETPROPERTY Cell,Property}

Cell	=	cell in which to store the property setting

Property	=	property of the selected object to study

{GETPROPERTY} lets you study the property settings of whatever object is selected. Property is the property to view (see Property Reference for a list of properties); its setting is stored in Cell.

Examples

{GETPROPERTY A23,"Text_Color"} stores the Text Color setting of the selected object in the cell A23.

{GETPROPERTY B42,"Box_Type"} stores the border style of the selected object in cell B42.

Related Topics


{GETWINDOWLIST}

Syntax

{GETWINDOWLIST Block}

Block	=	cells to store window names in

{GETWINDOWLIST} stores a list of the windows open on the Corel Quattro Pro desktop in Block, including dialog windows and chart windows. Windows hidden by Window [image] Hide are not included.

Tip

If Block is one cell, {GETWINDOWLIST} overwrites any information beneath the cell (if it finds more than one window open). To restrict the window names to specific cells, set Block to more than one cell.

Example

{GETWINDOWLIST A2..C5} stores a list of open windows in the cells A2..C5. The first window name is stored in A2, the second in B2, and so on. If more than twelve windows are open, only the first twelve are stored in the cells.

Related Topics


{GOTO}

{GOTO} lets you move the selector to a specific location.

A related macro, {QGOTO}, selects the cell or cells specified as its destination, while {GOTO} moves to the cell in the upper-left corner of the specified cells.

This command is for compatibility with Corel Quattro Pro for DOS; use {EditGoto} as the command equivalent for Edit [image] Go To.

Related Topics


{GRAPH}

{Graph} is equivalent to the Chart key, F11, which displays the current chart.

Related Topics


{GRAPHCHAR}

Syntax

{GRAPHCHAR Location}

Location	=	cell address or the cell name where the returned character should be stored

{GRAPHCHAR} returns the key a user presses to leave a chart or to remove a message box. The character is stored at Location. This command lets you create a chart or message that functions as a menu of choices. The character returned can be used to branch or display any other data.

{GRAPHCHAR} works with {MESSAGE} to record what key the user pressed to remove a message box. It captures only characters the user can normally type into a cell; special characters such as Esc are not stored.

Examples

The following example displays a message box (its contents being the_msg) and returns the character the user pressed to remove it. The key pressed is stored in cells named the_key.

\A	{MESSAGE the_msg,15,15,0}

{GRAPHCHAR the_key}

the_key

the_msg	Press C to continue or any other key to quit...

The next example displays a chart and waits for the user to press a key. This macro begins with the command found next to "_graphic" and assumes that the current file contains charts by the name of "line," "pie," "bar," and "area." If the user presses P, B, or A, Corel Quattro Pro displays a (predefined) pie chart, bar chart, or area chart, respectively. The macro stops playing when the user presses any key that is not P, B, or A.

the_chart	bar

the_key	b

_graphic	{GraphView "line"}

_continue	{GRAPHCHAR the_key}

{if @UPPER(the_key)="P"}{_draw "pie"}

{if @UPPER(the_key)="B"}{_draw "bar"}

{if @UPPER(the_key)="A"}{_draw "area"}

_draw	{DEFINE the_chart}

{GraphView the_chart}

{BRANCH _continue}

Related Topics


{GraphCopy}

Syntax

{GraphCopy FromChart, DestChart, <Style?(0|1)>, <Data?(0|1)>, <Annotations?(0|1)>}

FromChart	=	chart containing the style, data, or annotation objects to copy

DestChart	=	new chart (the copy)

Style?	=	whether to copy properties that affect the appearance of the chart: yes (1), no (0)

Data?	=	whether to copy chart data: yes (1), no (0)

Annotations?	=	whether to copy annotation objects: yes (1), no (0)

{GraphCopy} copies the style, data, and/or annotation objects from one chart to another (within a notebook or between notebooks). It is equivalent to copying chart attributes using Edit [image] Copy and Edit [image] Paste Special.

You can use {GraphCopy?} or {GraphCopy!} to display the Paste Special Chart dialog box. {GraphCopy?} lets the user manipulate the dialog box, whereas {GraphCopy!} relies on the macro to manipulate it.

Related Topics


{GraphDeactivate}

{GraphDeactivate} deactivates a floating chart that has been activated for editing.

Examples

The following macro activates a floating chart for editing, creates a rectangle in the chart, makes a copy of the rectangle, then deactivates editing.

{GraphEdit Chart1, 1}

{CreateObject Rect,147,176,416,427}

{Duplicate 269,338}

{GraphDeactivate}

Related Topics


{GraphDelete}

Syntax

{GraphDelete Name}

Name	=	name of the chart to delete

{GraphDelete} deletes the specified chart from the active notebook.

You can use {GraphDelete?} or {GraphDelete!} to display the Delete Chart dialog box. {GraphDelete?} lets the user manipulate the dialog box, whereas {GraphDelete!} relies on the macro to manipulate it.

Related Topics


{GraphEdit}

Syntax

{GraphEdit Name,<InPlace?(0|1)}

Name	=	name of the chart to edit

InPlace?	=	whether to edit the chart in place on a notebook sheet; 0 = no, 1 = yes; the default is 0

{GraphEdit} displays the specified chart in a chart window for editing. Use the InPlace? argument to edit a floating chart on the notebook sheet.

You can use {GraphEdit?} or {GraphEdit!} to display the Edit Chart dialog box. {GraphEdit?} lets the user manipulate the dialog box, whereas {GraphEdit!} relies on the macro to manipulate it.

Examples

The following macro selects the floating chart named Inserted1 and then activates its source chart (Chart1) for editing on the notebook sheet.

{SelectFloat Inserted1}

{GraphEdit Chart1,1}

Related Topics


{GraphGallery}

Syntax

{GraphGallery ChartStyle, ColorScheme}

ChartStyle	=	the style of chart; see {GraphSettings.Type} for a list of chart types

ColorScheme	=	the color scheme used for the chart

{GraphGallery} is the command equivalent for Chart [image] Gallery, which applies a chart style and color scheme to selected charts.

Available choices for ColorScheme are:

No change	Pastels

Default	Fire and Ice

Grayscale	Bright and Bold

Icy Blues	Color Washes

Deep Reds	Black and White Patterns

Autumn Leaves	Color Patterns

Tangerine	Tiled Men

You can use {GraphGallery?} or {GraphGallery!} to display the Chart Gallery dialog box. {GraphGallery?} lets the user manipulate the dialog box, whereas {GraphGallery!} relies on the macro to manipulate it.

Examples

The following macro selects a 3-D Bar chart style and a "Tangerine" color scheme:

{GraphGallery "3dbar","Tangerine"}

Related Topics


{GraphNew}

Syntax

{GraphNew Name,<UseCurrentBlock?(0|1)>}

Name	=	name of the new chart

UseCurrentBlock?	=	whether to chart the current selected cells; 0 = no, 1 = yes; the default is 0

{GraphNew} creates a new chart and displays it in a chart window. If UseCurrentBlock? is 1, any selected data is shown in the chart; if it is 0, {GraphNew} creates a new chart without data.

You can use {GraphNew?} or {GraphNew!} to display the New Chart dialog box. {GraphNew?} lets the user manipulate the dialog box, whereas {GraphNew!} relies on the macro to manipulate it.

Related Topics


{GraphSettings.Titles}

Syntax

{GraphSettings.Titles Main, Sub, X-Axis, Y-Axis, Y2-Axis}

Main	=	main title of the chart

Sub 	=	title appearing below the main title of the chart

X-Axis	=	title of the chart's x-axis

Y-Axis	=	title of the chart's y-axis

Y2-Axis	=	title of the chart's secondary y-axis

{GraphSettings.Titles} is equivalent to Chart [image] Titles, which sets the titles of the active chart (or selected floating chart or chart icon). Each argument is a string; to reset a title, use an empty string ("").

Example

The following macro command displays the chart Profit99 in a chart window and sets its main title and subtitles. The empty strings ("") indicate that there are no axis titles.

{GraphEdit Profit99}

{GraphSettings.Titles "Projected Profits","1999","","",""}

Related Topics


{GraphSettings.Type (Class)}
{GraphSettings.Type Type,Class}

{GraphSettings.Type} is equivalent to Chart [image] Type/Layout, which lets you specify how the data in a chart is displayed. It affects the active chart (or chart icon or floating chart). Class specifies the class of chart type being used. Class can be one of six settings: Area/Line, Bar, Stacked Bar, Pie, Specialty, and Text.

Chart [image] Type/Layout...	Command equivalent
Area/Line [image] 3-D Area	{GraphSettings.Type "3D Area,Area/Line"}
Area/Line [image] 3-D Marker	{GraphSettings.Type "3D Marker,Area/Line"}
Area/Line [image] 3-D Ribbon	{GraphSettings.Type "3D Ribbon,Area/Line"}
Area/Line [image] 3-D Unstacked area	{GraphSettings.Type "3D Unstacked area,Area/Line"}
Area/Line [image] Area	{GraphSettings.Type "Area,Area/Line"}
Area/Line [image] Line	{GraphSettings.Type "Line,Area/Line"}
Area/Line [image] Rotated area	{GraphSettings.Type "Rotated area,Area/Line"}
Area/Line [image] Rotated line	{GraphSettings.Type "Rotated line,Area/Line"}
Bar [image] 2-D Half bar	{GraphSettings.Type "2DHalf bar,Bar"}
Bar [image] 3-D Bar	{GraphSettings.Type "3D Bar,Bar"}
Bar [image] 3-D Step	{GraphSettings.Type "3D Step,Bar"}
Bar [image] Area Bar	{GraphSettings.Type "Area_bar,Bar"}
Bar [image] Bar	{GraphSettings.Type "Bar,Bar"}
Bar [image] High Low Bar	{GraphSettings.Type "Hilo_bar,Bar"}
Bar [image] Line Bar	{GraphSettings.Type "Line_bar,Bar"}
Bar [image] Multiple bar	{GraphSettings.Type "Multiple bar,Bar"}
Bar [image] Rotated  2-D bar	{GraphSettings.Type "R2D bar,Bar"}
Bar [image] Rotated  2-D Half bar	{GraphSettings.Type "R2DHalf bar,Bar"}
Bar [image] Rotated  3-D bar	{GraphSettings.Type "R3D bar,Bar"}
Bar [image] Variance	{GraphSettings.Type "Variance,Bar"}
Pie [image] 3-D Column	{GraphSettings.Type "3D Column,Pie"}
Pie [image] 3-D Doughnut	{GraphSettings.Type "3D Doughnut,Pie"}
Pie [image] 3-D Pie	{GraphSettings.Type "3D Pie,Pie"}
Pie [image] Column	{GraphSettings.Type "Column,Pie"}
Pie [image] Doughnut	{GraphSettings.Type "Doughnut,Pie"}
Pie [image] Multiple 3-D columns	{GraphSettings.Type "Multiple 3D columns,Pie"}
Pie [image] Multiple 3-D pies	{GraphSettings.Type "Multiple 3D pies,Pie"}
Pie [image] Multiple columns	{GraphSettings.Type "Multiple columns,Pie"}
Pie [image] Multiple pies	{GraphSettings.Type "Multiple pies,Pie"}
Pie [image] Pie	{GraphSettings.Type "Pie,Pie"}
Specialty [image] 3-D Contour	{GraphSettings.Type "3D Contour,Specialty"}
Specialty [image] 3-D Shaded Surface	{GraphSettings.Type "3D ShadedSurface,Specialty"}
Specialty [image] 3-D Surface	{GraphSettings.Type "3D Surface,Specialty"}
Specialty [image] High Low	{GraphSettings.Type "HiLo,Specialty"}
Specialty [image] Polar radar	{GraphSettings.Type "Polar radar,Specialty"}
Specialty [image] XY	{GraphSettings.Type "XY,Specialty"}
Stacked Bar [image] 100%  stacked bar	{GraphSettings.Type "100 stacked bar,Stacked Bar"}
Stacked Bar [image] 100%  stacked line	{GraphSettings.Type "100 stacked line,Stacked Bar"}
Stacked Bar [image] 3-D 100%  stacked bar	{GraphSettings.Type "3D100 stacked bar,Stacked Bar"}
Stacked Bar [image] 3-D Stacked bar	{GraphSettings.Type "3D Stacked bar,Stacked Bar"}
Stacked Bar [image] Rotated  2-D 100%  stacked bar	{GraphSettings.Type "R2D100 stacked bar,Stacked Bar"}
Stacked Bar [image] Rotated  2-D 100%  stacked line	{GraphSettings.Type "R2D100 stacked line,Stacked Bar"}
Stacked Bar [image] Rotated  2-D stacked bar	{GraphSettings.Type "R2D stacked bar,Stacked Bar"}
Stacked Bar [image] Rotated  2-D stacked line	{GraphSettings.Type "R2D stacked line,Stacked Bar"}
Stacked Bar [image] Rotated  3-D 100%  stacked bar	{GraphSettings.Type "R3D100 stacked bar,Stacked Bar"}
Stacked Bar [image] Rotated  3-D stacked bar	{GraphSettings.Type "R3D stacked bar,Stacked Bar"}
Stacked Bar [image] Stacked bar	{GraphSettings.Type "Stacked bar,Stacked Bar"}
Stacked Bar [image] Stacked line	{GraphSettings.Type "Stacked line,Stacked Bar"}
Text [image] Blank	{GraphSettings.Type "Blank,Text"}
Text [image] Bullet	{GraphSettings.Type "Bullet,Text"}
Example

{GraphSettings.Type "3-D Pie,Pie"} make the active chart a 3-D pie chart.

Related Topics


{GraphView}

Syntax

{GraphView <ChartName1,ChartName2,...>}

ChartName1	=	name of the first chart to display (optional)

ChartName2	=	name of the second chart to display (optional)

{GraphView} is equivalent to Chart [image] View Chart, which displays a chart (or series of charts) full-screen. {GraphView} without an argument displays the active chart (or chart icon or floating chart).

You can use {GraphView?} or {GraphView!} to display the View Chart dialog box. {GraphView?} lets the user manipulate the dialog box, whereas {GraphView!} relies on the macro to manipulate it.

Example

The following macro displays the named charts Profit90 through Profit94.

{GraphView Profit90,Profit91,Profit92,Profit93,Profit94}

Related Topics


{GraphWindow.Property}

{GraphWindow.Property} is equivalent to right-clicking the title bar of a chart window to set its Aspect Ratio or Grid properties.

{GraphWindow.Aspect_Ratio Option} sets the aspect ratio of the active chart. Option can be one of the following settings: "35mm Slide", "Floating Chart", "Full Extent", "Printer Preview", or "Screen Slide".

{GraphWindow.Grid GridSize,DisplayGrid,SnapToGrid} sets the grid size of the active chart window. Use GridSize to specify the percent of chart window between grid points; DisplayGrid specifies whether the grid is visible; SnapToGrid specifies whether the grid is active.

Example

This macro sets up a 10 by 10 grid, displays the grid, and enables it.

{GraphWindow.Grid "10,Yes,Yes"}


{Group.Option}

Command equivalent	Equivalent to
{Group.Define GroupName, StartPage, EndPage}	Insert [image] Name [image] Group of Sheets
{Group.Delete GroupName}	Insert [image] Name [image] Group of Sheets [image] Delete
{Group.ResetNames}	Clears all group names in the notebook; no equivalent command
{Group.Option} is the command equivalent for Insert [image] Name [image] Group of Sheets, which creates and deletes sheet groups.

Once you have defined a sheet group, you can use {Notebook.Group_Mode "On"} to activate Group mode. Use "Off" to cancel Group mode.

You can use {Group?} or {Group!} to display the Define/Modify Group dialog box. {Group?} lets the user manipulate the dialog box, whereas {Group!} relies on the macro to manipulate it.

Related Topics


{GroupObjects}

{GroupObjects} is the command equivalent for Format [image] Group. It groups selected objects in a chart window so they can be treated as one object in subsequent operations. Use {UngroupObjects} to treat them independently again.

Related Topics


{HELP}

{HELP} is equivalent to the Help key, F1. It displays a help topic.

Related Topics


{HISTOGRAM}

Syntax

{HISTOGRAM InBlock, OutBlock, <BinBlock>, <Pareto>, <Cum>}

InBlock	=	input cells containing one or more columns or rows of numeric values; the cells must not contain labels

OutBlock	=	upper left cell of the output cells

BinBlock	=	set of numbers defining the bin ranges; BinBlock numbers must be in ascending order; if BinBlock is omitted, bins are distributed evenly from the minimum to the maximum values in InBlock, with the number of bins equal to the square root of the number of values in InBlock

Pareto	=	1 to arrange the output table in both descending frequency order and ascending BinBlock order; 0 to arrange the output table in ascending BinBlock order; the default is 0

Cum 	=	flag indicating whether to generate a column in OutBlock showing cumulative percentages: yes (1) or no (0); the default is 0

{HISTOGRAM} calculates the probability and cumulative distributions for a sample population, based on a series of bins. {HISTOGRAM} is equivalent to the Histogram analysis tool.

Related Topics


{HLINE}

Syntax

{HLINE Distance}

Distance	=	distance in columns to scroll the active notebook horizontally

{HLINE} scrolls the active notebook horizontally by Distance columns. If the number is positive, it scrolls right; if negative, it scrolls left. {HLINE} does not move the selector; only the view of the notebook is altered, just as if the scroll bars were used. Use the commands {RIGHT} or {LEFT} to move the selector horizontally.

Examples

{HLINE 10}	scrolls the display 10 columns to the right.

{HLINE -5}	scrolls the display 5 columns to the left.

Related Topics


{HOME}

{HOME} is equivalent to the Home key.

Related Topics


{HPAGE}

Syntax

{HPAGE Distance}

Distance	=	distance in screens to scroll the active notebook horizontally

{HPAGE} scrolls the active notebook horizontally by Distance screens. If the number is positive, it scrolls right; if negative, it scrolls left. {HPAGE} does not move the selector; only the view of the notebook is altered. Use {BIGRIGHT} or {BIGLEFT} to move the selector horizontally.

Related Topics


{IF}

Syntax

{IF Condition}

Condition	=	a logical expression (or the address of a cell containing a label, value, or expression)

{IF} operates like @IF. {IF} evaluates Condition; if it is numeric and nonzero, it is considered to be TRUE and macro execution continues in the same cell; if Condition is anything else, it is considered FALSE, and macro execution continues in the cell directly below the {IF} command. Unlike @IF, {IF} commands cannot be nested within each other.

Examples

The following example says, in English, "If the value stored in gpa is greater than 0.59, run the macro _pass_student; otherwise, run the macro _fail_student."

\F	{IF gpa>.59}{BRANCH _pass_student}

{BRANCH _fail_student}

If you do not want both the true and false clauses executing, be sure to include {BRANCH} or {QUIT} in the same cell as {IF}, as shown in both examples. The following example uses a string of {IF} commands to award a grade based on a test result:

\G	{IF result>=.90}{BRANCH _give_a}

{IF result>=.80}{BRANCH _give_b}

{IF result>=.70}{BRANCH _give_c}

{IF result>=.56}{BRANCH _give_d}

{BRANCH _give_f}

Related Topics


{IFAUTOOBJ}

Syntax

{IFAUTOOBJ ObjectExpression}

ObjectExpression	=	object expression resulting from an OLE automation object

{IFAUTOOBJ} is like {IF}, but instead evaulating a logical condition it expects the object expression resulting from an OLE automation object. If ObjectExpression is true, {IFAUTOOBJ} runs the macro in the same cell; otherwise, it skips to the next cell.

Examples

{ASSIGN OLE2App, GetObject("DispCalc.Application")}

{IFAUTOOBJ OLE2App}{BRANCH A10}

{ASSIGN OLE2App, CreateObject("DispCalc.Application")}

For more details on using {IFAUTOOBJ} and other OLE automation macro commands, Using OLE Automation Features.


{IFKEY}

Syntax

{IFKEY String}

String	=	any macro name for a key (such as PGUP, END, GRAPH, and so on) without braces, or a string that returns a key macro name without braces

{IFKEY} is like {IF}, but runs the next macro command in the current cell if String is the name of a key macro command (such as {ESC} or {HOME}). Do not enclose the name stored in String in braces. For example, {IFKEY "HOME"} evaluates as true because HOME is the name of a macro command; {IFKEY "A"} evaluates as false because it is not the name of a macro command. String can be a string or a text formula.

Related Topics


{IMFORMAT}

Syntax

{IMFORMAT Format}

Format	=	flag indicating what suffix and format to use for imaginary coefficient of complex number; the default is 1; 1 = x + yi, 2 = x + yj, 3 = x + iy, 4 = x + jy

{IMFORMAT} specifies how complex numbers display in the active notebook, and returns a label showing the selected format.

Examples

{IMFORMAT 1} returns "x+iy"

{IMFORMAT 2} returns "x+jy"

Related Topics


{ImportGraphic}

Syntax

{ImportGraphic Filename}

Filename	=	name of the bitmap or other graphics file to import

{ImportGraphic} is the command equivalent for Insert [image] Graphics [image] Clipart. It imports graphics files into a chart window.

You can use {ImportGraphic?} or {ImportGraphic!} to display the Insert Image dialog box. {ImportGraphic?} lets the user manipulate the dialog box, whereas {ImportImage!} relies on the macro to manipulate it.

Related Topics


{INDICATE}

Syntax

{INDICATE String}

String	=	any seven-character string

{INDICATE} sets the mode indicator in the lower right corner of the screen to read whatever is given as String. If String is longer than seven characters, only the first seven are used. To restore the mode indicator to its normal setting, use {INDICATE} with no arguments. To hide the mode indicator, use {INDICATE ""}.

Example

{INDICATE "Save!"} changes the indicator to read Save!.

{INDICATE " Go! "} changes the indicator to read Go! with a space preceding and following it.

{INDICATE E14} changes the indicator to E14 because cell references are ignored.

{INDICATE} restores the normal mode indicator.

Related Topics


{INITIATE}

Syntax

{INITIATE AppName,Topic,ChannelLoc}

AppName	=	name of the Windows application to communicate with

Topic 	=	name of the file within the Windows application to communicate with

ChannelLoc	=	cell to contain the Channel ID number of the conversation if communication succeeds

{INITIATE} requests a channel of communication with the application AppName. This application must support Dynamic Data Exchange (DDE). If the request succeeds, the identification number of the conversation (DDE communication) is stored in the cell ChannelLoc. Topic can be a Corel WordPerfect document, an Excel spreadsheet, an ObjectVision form, or other DDE server-application file. If there is no specific file to communicate with in the other application, you can set Topic to System.

AppName, Topic, or both can be an empty string (""). The empty string works as a wildcard to display a list of possible conversations to choose from.

You can use {INITIATE} multiple times with the same application; if you do this, use a different ChannelLoc for each conversation. Once a channel opens, you can use {REQUEST}, {EXECUTE}, or {POKE} to communicate with the application.

When the DDE conversation is complete, use {TERMINATE} to end it. See {EXECUTE} for an example of {INITIATE}.

Related Topics


{INS}, {INSERT}, {INSOFF}, and {INSON}

{INS} and {INSERT} toggle the Ins key on or off. {INSOFF} is equivalent to Ins off, and {INSON} to Ins on.

Related Topics


{InsertObject}

Syntax 1: Embedding/Linking from a File

{InsertObject Filename, <DisplayAsIcon?(0|1)>, <Linked?(0|1)>}

Filename	=	file that you want to link/embed as an object

DisplayAsIcon	=	whether to display the object as an icon; 0 to show the object as it looks in the server application; 1 to display the object as an icon

Linked?	=	whether to link to the file; 0 to not link; 1 to link; the default is 0

Syntax 2: Embedding a New Object

{InsertObject ObjectType, <DisplayAsIcon?(0|1)>}

ObjectType	=	type of object to insert (the name of an OLE server)

DisplayAsIcon	=	whether to display the object as an icon; 0 to show the object as it looks in the server application; 1 to display the object as an icon

{InsertObject} is equivalent to Insert [image] Object, which inserts an OLE object into the active notebook without using the Clipboard.

You can use {InsertObject?} or {InsertObject!} to display the Insert Object dialog box. {InsertObject?} lets the user manipulate the dialog box, whereas {InsertObject!} relies on the macro to manipulate it.

Example

This macro inserts a picture created in Paintbrush into the active notebook.

{InsertObject "Paintbrush Picture"}

Related Topics


{InsertPageBreak}
{InsertPageBreak.Option}

Command equivalent	Equivalent to Insert [image] Page Break...
{InsertPageBreak.Create Row#, Column#}	... Create
{InsertPageBreak.Delete Row#, Column#}	... Delete
{InsertPageBreak.Create} inserts a page break above Row# and to left of Column#.

{InsertPageBreak.Delete} deletes the current PageBreak above Row# and to left of Column#.

Related Topics


{INSPECT}

{INSPECT} is equivalent to the Inspect key, F12. It displays an Object Inspector for the current object.

Related Topics


{Invert.Option}

Command equivalent	Equivalent to Tools [image] Numeric Tools [image] ...
{Invert.Destination Block}	...Invert [image] Destination
{Invert.Go}	...Invert [image] OK
{Invert.Source Block}	...Invert [image] Source
{Invert.Option} is the command equivalent for Tools [image] Numeric Tools [image] Invert. It inverts a square matrix (indicated by {Invert.Source Block}) and stores the invert matrix in other cells (indicated by {Invert.Destination Block}). Use {Invert.Go} after the other two matrix-inversion command equivalents to complete the operation.

You can use this command equivalent with {Multiply.Option} to solve sets of linear equations.

You can use {Invert?} or {Invert!} to display the Matrix Invert dialog box. {Invert?} lets the user manipulate the dialog box, whereas {Invert!} relies on the macro to manipulate it.

Related Topics


{LEFT}
{LEFT} and {L}

Syntax

{LEFT <Number>} or {L <Number>}

Number	=	any positive integer (optional)

{LEFT} and {L} are equivalent to the Left Arrow key. The optional argument Number moves the selector the corresponding number of columns to the left. You can use cell references or cell names as arguments.

Examples

{L}{L}{L} moves the selector left three columns.

{LEFT 6} moves the selector six columns to the left.

{LEFT D9} moves to the left the number of columns specified in cell D9.

{LEFT count} moves to the left the number of columns specified in the first cell of the cells named count.

Related Topics


{LET}

Syntax

{LET Location,Value<:Type>}

Location	=	cell in which to store the specified value

Value	=	numeric or string value to be stored in Location

Type	=	string or value; string (or s) stores the value or formula as a label, and value (or v) stores the actual value or value resulting from a formula (optional)

With {LET}, you can enter a value into Location without moving to it. {LET} enters the value or string you specify with Value in Location.

You can use the optional Type argument to specify whether to store Value as an actual number or as a string. If you specify a formula as a string, the formula is written into Location as a string, not the resulting value. For example, {LET A1,B3*23:string} stores the formula B3*23 as a label in cell A1. If you omit Type, Corel Quattro Pro tries to store the value as a numeric value; if unsuccessful, it stores the value as a string.

Location must be a cell address or cell name; you can use functions such as @CELLPOINTER as a Location in {LET} commands only if they return a cell address or cell name.

Tip

Value cannot be an @ARRAY formula. {LET} does not not enter array values. Use {PUTCELL} or {PUTCELL2} to enter array values.

You can use {LET} to invoke add-in @functions or macros contained in DLLs. Specify the add-in as Value, using this syntax for functions:

@dllname.functionname(functionargument1, functionargument2, ...)

For example, this statement calls the @function MEDIAN, included in DLL Stats, with a five-item list as an argument and stores the result in Location G6:

{LET G6,@Stats.MEDIAN(2,4,6,8,10)}

The macro syntax is identical:

@dllname.macroname(macroargument1, macroargument2, ...)

Examples

{LET(@CELLPOINTER("address")),99} makes the value of the active cell 99.

The examples below assume A1 contains the label 'Dear, A2 contains the label 'Sir, and A3 contains the value 25. The result is shown to the right of each {LET}.

\M	{LET F1,25}	25

{LET F2,A3}	25

{LET F3,+A1&""&A2}	Dear Sir

{LET F4,+A1&""&A2:value}	Dear Sir

{LET F5,+A1&""&A2:string}	+A1&""&A2

{LET F6,+A1&A3}	ERR (because A3 is a value)

Related Topics


{Link}

Syntax

{Link "string"}

{Link} applies a link to the currently selected object, such as a pushbutton in a dialog or Toolbar. {Link} is not recordable, but is equivalent to right-clicking dialog or toolbar objects and choosing "Links."

Example

{Link "ON Clicked DOMACRO {filesave}"}


{Links.Option}

Command equivalent	Equivalent to Edit [image] Links [image] ...
{Links.Change OldName, NewName}	Change Link
{Links.Delete LinkName|*} (* = all links)	Delete Links
{Links.Open LinkName|*} (* = all links)	Open Links
{Links.Refresh LinkName|*} (* = all links)	Refresh Links
{Links.Option} is equivalent to commands on the Edit [image] Links menu, which refresh, change, or delete links in the active notebook.

LinkName is the name of the file being linked to. You can set LinkName to * to affect all links in the active notebook. If LinkName is omitted, the dialog box that normally performs the operation appears (and is under macro control; use {PAUSEMACRO} to pass control to the user).

Examples

{Links.Refresh *} refreshes all links in the active notebook.

The following macro displays the Open Links dialog box and lets the user select the name of a linked notebook to open.

{Links.Open}

{PAUSEMACRO}

Related Topics


{LOOK}

Syntax

{LOOK Location}

Location	=	a cell in which to store a typed character

When Corel Quattro Pro runs a macro, it does not respond to keystrokes the user enters (except Ctrl+Break). If the user presses keys during macro execution, those keystrokes are stored in the computer's type-ahead buffer and are responded to when the macro pauses for input or ends.

{LOOK} checks this type-ahead buffer for stored keystrokes. If any are found, it places the first keystroke the user typed in Location as a macro command.

{LOOK} can be used while processing long macros to check for a keystroke that might signal the user wants to quit (see the next example).

{LOOK} does not remove the keystroke from the buffer. If a macro does nothing other than {LOOK}, the key still passes to Corel Quattro Pro when the macro ends. To remove pending keystrokes from the buffer, use {GET}.

Example

In the following example, the macro gives you 15 seconds to choose the next menu choice. If you do not, you must reenter the password. Important: Type the line to the right of _check_it with no hard returns until after {BRANCH _password}, then press Enter to insert it into one cell (the macro commands from {LOOK keystroke} to {BRANCH -password} are shown here on separate lines for readability).

\M	{QGOTO}msg_area~

A. Add name{DOWN}

B. Edit name{DOWN}

C. Delete name{DOWN}

Enter choice: {RIGHT}

{ }

{LET start_time,@NOW}

_check_it	{LOOK keystroke}

{IF keystroke=""}

{IF @NOW>start_time + @TIME(0,0,15)}

{BRANCH _password}

{IF keystroke<>""}{BRANCH _take_action}

{BEEP 4}

{BRANCH _check_it}

_password	{; get password from user}

{GETLABEL "Enter password : ",pass}

_take_action	{ }

{BEEP 3}

start_time

keystroke

pass

msg_area

Related Topics


{MACROS}

{MACROS} is equivalent to the Macros key, Shift+F3, which displays a menu of macro commands to type into the input line.

Related Topics


{MapExpert}

{MapExpert} is the command equivalent for Insert [image] Graphics [image] Map. The macro has no arguments. {MapExpert} displays the first Map Expert dialog box.

Related Topics


{MapNew}

Syntax

{MapNew Name,<UseBlock>}

Name	=	name of the new map

UseBlock	=	1 to create the map using data in the current cells

{MapNew} is the command equivalent for Insert [image] Graphics [image] Map.

Related Topics


{MARK}

{MARK} is equivalent to the Select key, Shift+F7, which lets you begin selection of cells.

Related Topics


{MCORREL}

Syntax

{MCORREL InBlock, OutBlock, <Grouped>, <Labels>}

InBlock	=	input cells containing two or more sets of numeric data arranged in columns or rows

OutBlock	=	upper left cell of the output cells

Grouped	=	"C" to group results by column or "R" to group results by row; the default is "C"

Labels	=	1 if labels are located in the first column or row of the input cells; 0 if the input cells do not contain labels; the default is 0

{MCORREL} computes the correlation matrix between two or more data sets. {MCORREL} is equivalent to the Correlation analysis tool.

Related Topics


{MCOVAR}

Syntax

{MCOVAR InBlock, OutBlock, <Grouped>, <Labels>}

InBlock	=	input cells containing two or more sets of numeric data arranged in columns or rows

OutBlock	=	upper left cell of the output cells

Grouped	=	"C" to group results by column or "R" to group results by row; the default is "C"

Labels	=	1 if labels are located in the first column or row of the input cells; 0 if the input cells do not contain labels; the default is 0

{MCOVAR} returns the covariance matrix between two or more data sets. {MCOVAR} is equivalent to the Covariance analysis tool.

Related Topics


{MENU}

{MENU} is equivalent to the Menu key (Alt or F10). This command moves the selector to the menu bar and highlights the first menu.

Related Topics


{MENUBRANCH}

Syntax

{MENUBRANCH Location}

Location	=	cells containing menu cells

{MENUBRANCH} pauses macro execution to display the custom pop-up menu stored at Location. After the user chooses an item from the menu, macro execution continues with the cell below the description of the menu choice. Often this is a {BRANCH}. The only exception is if the user presses Esc, or clicks outside the menu; in this case, the macro continues in the {MENUBRANCH} cell.

With the exception of the Esc key, a custom pop-up menu acts the same as one of Corel Quattro Pro's own menus. Users can press the arrow keys to look at each item, and can choose a menu item by either pressing Enter while highlighting it, pressing the first letter of the menu item's name, or choosing it with the mouse.

Example

The following macro displays a custom menu that offers the user three choices. If the user presses Esc, the menu is redisplayed with {BRANCH \F}.

quit_menu	Continue	Return	Quit

Continue macro	Return to Ready	Leave Corel Quattro Pro

{BRANCH \F}	{BRANCH _continue}	{MENUBRANCH sure}

sure	No	Yes

Stay in Corel Quattro Pro	Return to DOS

{BRANCH \F}	{FileExit}

\F	{MENUBRANCH quit_menu}

{BRANCH \F}

_continue

Related Topics


{MENUCALL}

Syntax

{MENUCALL Location}

Location	=	cells containing a custom Corel Quattro Pro menu

{MENUCALL} pauses macro execution and displays the custom pop-up menu stored at Location. It treats the called menu as a subroutine. After the user chooses an item from the menu, macro execution continues in the cell containing {MENUCALL}.

See {ADDMENU} and {ADDMENUITEM} for information on adding menus or menu commands to the Corel Quattro Pro menu bar.

Example

The following macro uses two consecutive custom menus to let the user change search criteria for a database. It then copies records that meet the criteria to the output cells and branches to another macro to print the output cells as labels. The cell name stat references the cell in the criteria table containing A in the example; pay references the cell in the criteria table containing F.

m_status	Active	Retired

Active Members 	Retired Members

{LET stat, "A"}	{LET stat, "R"}

m_paid	Paid	Unpaid

Dues are paid	Dues are unpaid

{LET pay, "T"}	{LET pay, "F"}

\M	{;Choose members for label print}

{MENUCALL m_status}

{MENUCALL m_paid}

{Query.Extract}

{BRANCH print_labels}

Database Criteria Cells:

STATUS	PAID

A	F

Related Topics


{MESSAGE}

Syntax

{MESSAGE Block,Left,Top,Time}

Block	=	cell name or coordinates of the text and/or floating object to display in the message box

Left	=	screen column number (counting from 0) where the top left corner of the box should appear

Top	=	screen line number (counting from 0) where the top left corner of the box should appear

Time	=	Corel Quattro Pro time serial number

{MESSAGE} displays the contents of Block in a dialog box until Time is reached; Time is a standard Corel Quattro Pro date/time serial number (decimal portion). The window appears at the screen (not the notebook) coordinates Left,Top.

The message box contains a "snapshot" of current Block contents, including all fonts, colors, and other formatting. If Block includes a floating chart, bitmap, or macro button, its image displays in the message cells.

The height and width of the message box depend on the defined width and depth of Block. If text overflows the cell it is typed into, be sure to include adjoining cells in Block. Otherwise, the message will be truncated at the edge of Block.

The message box always appears over the frontmost window, even if that window is not a notebook (for example, a chart window).

If you enter 0 for Time, Corel Quattro Pro displays the box until the user presses any key. (You can use {GRAPHCHAR} to test for which key is pressed.)

Example

This example displays a message box for 15 seconds and then displays another box indefinitely. If the user presses Y, the macro closes the notebook without saving it. If the user, presses N (which is returned in the cells the_key), the user removes the second message box.

the_key

\A	{MESSAGE msg1,15,5,+@NOW+@TIME(0,0,15)}

_warning	{MESSAGE msg2,15,5,0}

{GRAPHCHAR the_key}

{IF @UPPER(the_key)="Y"}{BRANCH _lose_data}

msg1	Warning! You may lose data if you continue.

msg2	Are you sure you want to continue?

Press Y to continue or any other key to cancel...

_lose_data	{FileClose 0}

Related Topics


{MOVEAVG}

Syntax

{MOVEAVG InBlock, OutBlock, <Interval>, <StdErrs>}

InBlock	=	input cells containing a single column or row with at least four numeric values; the cells must not contain labels

OutBlock	=	upper left cell of the output cells

Interval	=	number of values to include in the moving average; the default is 3

StdErrs	=	flag indicating whether to include standard error values in the OutBlock: yes (1) or no (0); the default is 0

{MOVEAVG} returns a moving average for a specified Interval based on the values for the preceding periods in InBlock. {MOVEAVG} is equivalent to the Moving Average analysis tool.

Related Topics


{MOVETO}

Syntax

{MOVETO x,y}

x,y	=	position to move the currently selected object(s) to in pixels

{MOVETO} moves all selected objects in the active window (dialog, chart, or Objects sheetg window) to the position specified by x,y. Since {MOVETO} is context-sensitive, you can use it to move controls in a dialog window or drawings in a chart window. It also moves chart icons on the Objects sheet. (Use {FLOATMOVE} to move floating objects in a notebook window.)

The coordinates x and y represent where to move the upper left corner of the object(s). Object size does not change.

Related Topics


{MTGAMT}

Syntax

{MTGAMT <OutBlock>, <Rate>, <Term>, <OrigBal>, <EndBal>, <LastYear>}

OutBlock	=	upper left cell of the output cells

Rate	=	yearly interest rate; the default is 0.12

Term	=	number of years in the loan; the default is 30 years; can be a fractional value to designate months (for example, 3+5/12)

OrigBal	=	original loan balance; the default is $100,000

EndBal	=	balance at loan completion; the default is $0

LastYear	=	last year through which the amortization period is generated; the default is equal to Term (the end of the loan); can be a fractional value to designate months (for example, 3+5/12)

{MTGAMT} generates an amortization schedule for a mortgage. {MTGAMT} is equivalent to the Amortization Schedule analysis tool.

Related Topics


{MTGREFI}

Syntax

{MTGREFI <OutBlock>, <CurrBal>, <CurrRate>, <RemTerm>, <CandPctFees>, <CandRate>}

OutBlock	=	upper left cell of the output cells

CurrBal 	=	remaining principal on the current loan

CurrRate	=	annual interest rate on the current loan

RemTerm 	=	remaining term on the current loan

CandPctFees	=	percentage fees ("points") for the candidate loan

CandRate	=	annual interest rate for the candidate loan

{MTGREFI} generates a table of information relating to refinancing a mortgage. {MTGREFI} is equivalent to the Mortgage Refinancing analysis tool.

Related Topics


{Multiply.Option}

Command equivalent	Equivalent to Tools [image] Numeric Tools [image] ...
{Multiply.Destination Block}	...Multiply [image] Destination
{Multiply.Go}	...  OK
{Multiply.Matrix_1 Block}	...Multiply [image] Matrix 1
{Multiply.Matrix_2 Block}	...Multiply [image] Matrix 2
{Multiply.Option} is the command equivalent for Tools [image] Numeric Tools [image] Multiply. It multiplies one matrix ({Multiply.Matrix_1 Block}) by another ({Multiply.Matrix_2 Block}) and stores the product in other cells ({Multiply.Destination Block}). Use {Multiply.Go} after the other matrix-multiplication command equivalents to complete the operation.

You can use this command equivalent with {Invert.Option} to solve sets of linear equations.

You can use {Multiply?} or {Multiply!} to display the Matrix Multiply dialog box. {Multiply?} lets the user manipulate the dialog box, whereas {Multiply!} relies on the macro to manipulate it.

Example

This macro multiplies cells C2..D6 by cells C18..G19 and stores the results in the cells with upper-left cell F1.

{Multiply.Matrix_1 A:C2..D6}

{Multiply.Matrix_2 A:C18..G19}

{Multiply.Destination A:F1}

{Multiply.Go}

Related Topics


{NAME}

{NAME} is equivalent to the Choices key, F3, which displays a list of cell names in the current notebook, if cell names exist in the notebook. (If there are no named cells, the list of cell names won't appear.)

Use {NAME} with {GOTO}. For example,

{GOTO}{NAME}

Related Topics


{NamedStyle.Option}

Command equivalent	Equivalent to Format [image] Styles...
{NamedStyle.Alignment "HorizAlignment(General | Left | Right | Center | Center Across Block), VertAlignment(Top | Center | Bottom), WrapText?(0|1), Orientation(Horizontal | Vertical)"}	... Included Properties [image] Alignment
{NamedStyle.Define "StyleName", Align?, NumericFormat?, Protection?, Lines?, Shading?, Font?, TextColor?}	... Define Style For
{NamedStyle.Delete StyleName}	... Delete
{NamedStyle.Font "FontName, PointSize, Bold, Italic, Underline, Strikeout"}	... Included Properties [image] Font
{NamedStyle.Line_Drawing "LeftLine(None | Single | Double | Thick), TopLine, RightLine, BottomLine, LeftColor, TopColor, RightColor, BottomColor"}	... Included Properties [image] Line Drawing
{NamedStyle.Numeric_Format NumericFormat}	... Included Properties [image] Format
{NamedStyle.Protection Protect|Unprotect}	... Included Properties [image] Protection
{NamedStyle.Shading ForegroundColor, BackgroundColor, Pattern}	... Included Properties [image] Shading
{NamedStyle.Text_Color 0-15}	... Included Properties [image] Text Color
{NamedStyle.Option} is equivalent to Format [image] Styles, which lets you create styles in the active notebook.

These command equivalents do not take effect until the command {NamedStyle.Define} is used to create (or modify) a style. The arguments Align? through TextColor? each specify one property to include in the style; use 1 to include the property, 0 to exclude the property.

{NamedStyle.Font} sets the new typeface and size of text in the cell. Bold, Italic, Underline and Strikeout can be "Yes" to include that type feature or "No" to omit it.

{NamedStyle.Shading} sets the shading of the cell; ForegroundColor and BackgroundColor are numbers from 0 to 15; each specifies a color on the notebook palette to use; Pattern is a string ("Blend1" through "Blend7").

You can use {NamedStyle?} or {NamedStyle!} to display the Styles dialog box. {NamedStyle?} lets the user manipulate the dialog box, whereas {NamedStyle!} relies on the macro to manipulate it.

Example

This macro creates a new style named RedNote, which makes the active cells red, and sets a new font.

{NamedStyle.Font "Courier,10,Yes,No,No,No"}

{NamedStyle.Text_Color "4"}

{NamedStyle.Define RedNote,0,0,0,0,0,1,1}

Related Topics


{Navigate.Option}

Command	Description
{Navigate.SelectTable}	Expands selection to the table boundaries
{Navigate.Zoom2Fit}	Zooms so that a table fits into the visible part of the screen
{Navigate.GoTo Up | Left | Right | Down | TopLeft | TopRight | BottomLeft | BottomRight , <Extend?(0|1)>}	Go to the sides or corners of a table. When the optional Extend? argument is 1, cell selection is extended.
{Navigate.Jump Up | Left | Right | Down}	Jump to the next table in a given direction, or jump to the current table boundary if in the middle of a table.
{Navigate.Option} is equivalent to the navigation tools available on the Modeling Toolbar. {Navigate.SelectTable} is equivalent to the SpeedSelect button [image] on the Modeling Toolbar, which expands selection from a cell or cells within a table to the entire table. {Navigate.Zoom2Fit} is equivalent to the Zoom To Fit button [image]. {Navigate.GoTo} performs the same actions as the Top Left Of Table [image], Top Right Of Table [image], Bottom Left Of Table [image], and Bottom Right Of Table [image] buttons. {Navigate.Jump} jumps to the next table or to the selected boundary of the current table.

Examples

The following macro selects cell C6 in the table below, then selects the entire table that C6 belongs to, and zooms to fit the table on the page.

{SelectBlock A:C6}

{Navigate.SelectTable}

{Navigate.Zoom2Fit}

A	B	C	D

1	Sales	Expenses	Profits

2	Jan	1580	700	880

3	Feb	2474	545	1929

4	Mar	2570	656	1914

5	Apr	2876	454	2422

6	May	3223	489	2734

7	Jun	2987	470	2517

8	Jul	3178	500	2678


{NEXTPANE}

Syntax

{NEXTPANE <CellAtPointer?>}

CellAtPointer?	=	specifies which cell should be active when the pane switches (0 or 1, optional)

{NEXTPANE} switches between the panes of a notebook window previously split using View [image] Split Window. The optional argument CellAtPointer? specifies whether the active cell in the pane will be at the location of the selector (1) or its previous position (0). This command is equivalent to the Pane key, F6.

Related Topics


{NEXTTOPWIN}

Syntax

{NEXTTOPWIN <Number>}

Number	=	number of times to repeat the operation (optional)

{NEXTTOPWIN} is equivalent to the Next Window key, Ctrl+F6. It makes the next window active and moves the selector to it.

Related Topics


{NEXTWIN}

Syntax

{NEXTWIN <Number>}

Number	=	number of times to repeat the operation (optional)

{NEXTWIN} is equivalent to Shift+F6. It makes the bottom window active and moves the selector to it. This macro is included for compatibility with Corel Quattro Pro for DOS.

Related Topics


{Notebook.Property}

{Notebook.Property} is equivalent to choosing Format [image] Notebook. Each command affects the active notebook. The next table lists the possible settings for Property. To display a description with syntax, choose that property in the following list:

Property	Format [image] Notebook option

Display	Display

Group_Mode	none

Macro_Library	Macro Library

Palette	Palette

Password	none

Password_Level	Password Level

Recalc_Settings	Recalc Settings

System	System

Zoom_Factor	Zoom Factor

You can use {Notebook?} or {Notebook!} to display the Active Notebook dialog box. {Notebook?} lets the user manipulate the dialog box, whereas {Notebook!} relies on the macro to manipulate it.

Related Topics


{Notebook.Display<.Option>}

{Notebook.Display<.Option>}	Equivalent to Format [image] Notebook...
{Notebook.Display "VertScroll, HorizScroll, Tabs, Objects"}	... Display
{Notebook.Display.Objects Show All|Show Outline|Hide}	... Display [image] Objects
{Notebook.Display.Show_HorizontalScroller Yes|No}	... Display [image] Horizontal Scroll Bar
{Notebook.Display.Show_Tabs Yes|No}	... Display [image] Sheet Tabs
{Notebook.Display.Show_VerticalScroller Yes|No}	... Display [image] Vertical Scroll Bar
{Notebook.Display.Option} is equivalent to options of the notebook property Display.

Example

This macro command hides the vertical and horizontal scroll bars of the active notebook, reveals the sheet tabs, and shows all objects.

{Notebook.Display "No,No,Yes,Show All"}

Related Topics


{Notebook.Group_Mode On|Off}

{Notebook.Group_Mode On|Off} activates or deactivates group mode. This command is equivalent to using the View [image] Group Mode command (or pressing Alt+F5).

Related Topics


{Notebook.Macro_Library Yes|No}

{Notebook.Macro_Library Yes|No} is equivalent to options of the notebook property Macro Library. To make the active notebook a macro library, use Yes.

Related Topics


{Notebook.Palette<.Option>}

{Notebook.Palette<.Option>}	Equivalent to Format [image] Notebook...
{Notebook.Palette Color1,Color2,...,Color16}	... Palette
{NoteBook.Palette.Color_n "RGB value"}	... Palette
{NoteBook.Palette.Color_n.RGB value}	... Palette [image] Edit Color
{NoteBook.Palette.Color_n. RGB value }	... Palette [image] Edit Color
{NoteBook.Palette.Color_n. RGB value }	... Palette [image] Edit Color
{Notebook.Palette.Option} is equivalent to the notebook property Palette, which lets you set the colors of the active notebook. The arguments of {Notebook.Palette} (Color1 through Color16) each have three parts, separated by commas: RedValue, GreenValue, and BlueValue. Each part is a number from 0 to 255. You can also edit a part individually (see the second example).

Examples

{Notebook.Palette.Color_3 "255,0,255"} sets the third color on the notebook palette to violet (Red 255, Blue 255).

{Notebook.Palette.Color_5.Blue "135"} sets the amount of blue in the fifth color to 135.

Related Topics


{Notebook.Password Password}

{Notebook.Password Password} sets the password of the active notebook. The next save operation encrypts the file on disk.

Tip

Before specifying a password, set the password level using {Notebook.Password_Level}.

Related Topics


{Notebook.Password_Level}
{Notebook.Password_Level None|Low|Medium|High}

{Notebook.Password_Level} sets the password level of the active notebook. If you specify a password level of Low, Medium, or High, you must also specify a password using {Notebook.Password}.

Related Topics


{Notebook.Recalc_Settings Mode, Order, Iterations}
{Notebook.Recalc_Settings "Mode, Order, Iterations, , <AuditErrors?(0|1)>"}

{Notebook.Recalc_Settings} is equivalent to options of the notebook property Recalc Settings. This command equivalent sets the recalculation options of the active notebook. Mode options are "Automatic", "Background", and "Manual". Order can be "Column-wise", "Row-wise", or "Natural". Iterations specifies the number of times formulas are recalculated before calculation is considered complete (relevant only if Order is changed, or if you use circular references).

To highlight the source of error for each cell containing NA or ERR in the active notebook, set the optional argument AuditErrors? to 1.

Related Topics


{Summary.Option}
{Notebook.Summary.Option}

Command Equivalent	Equivalent to File [image] Properties [image]...
{Notebook.Summary.Title Title }	Title
{Notebook.Summary.Subject Subject}	Subject
{Notebook.Summary.Author Author}	Author
{Notebook.Summary.Keywords Keywords}	Keywords
{Notebook.Summary.Comments Comments}	Comments
{Notebook.Summary.Option} is equivalent to File [image] Properties, which displays summary information about the current notebook.

You can use the following options with @COMMAND to get information about the notebook.

{Notebook.Statistics.Created}

{Notebook.Statistics.Directory}

{Notebook.Statistics.FileName}

{Notebook.Statistics.Last_Saved}

{Notebook.Statistics.Last_Saved_By}

{Notebook.Statistics.Revision_Number}


{Notebook.System}
{Notebook.System Yes|No}

{Notebook.System Yes|No} makes the active notebook a system notebook.

Related Topics


{Notebook.Zoom_Factor}
{Notebook.Zoom_Factor 10-400}

{Notebook.Zoom_Factor} is equivalent to options of the notebook property Zoom Factor, which sets the zoom factor of the active notebook (from 10% to 400%). This setting is for display only and does not affect printed output.

Related Topics


{NUMOFF} and {NUMON}

{NUMOFF} and {NUMON} are equivalent to Num Lock off and Num Lock on, respectively.

Related Topics


{OBJECTSPAGEGOTO}

{OBJECTSPAGEGOTO} displays the Objects sheet of the active notebook and is equivalent to View [image] Objects sheet (or pressing Shift+F5 when a spreadsheet sheet is active). When the Objects sheet is active, you can use {SELECTOBJECT} to select icons, and other object commands to manipulate them.

You can use {SELECTBLOCK} to move from the Objects sheet to a spreadsheet sheet.

Related Topics


{OLE.Option}

Command equivalent	Equivalent to...

{OLE.ActivateAs ObjectType}	Edit [image] <OLE Object> [image] Convert [image] Activate As

{OLE.AutomaticResize 0|1}	OLE Object properties [image] Automatic Resizing

{OLE.AutomaticUpdate 0|1}	OLE Object properites [image] Automatic Update

{OLE.Change_Link FileName}	Edit [image] <OLE Object> [image] Change Link

{OLE.Change_To_Picture}	Edit [image] <OLE Object> [image] Convert (to picture object)

{OLE.Convert ObjectType}	Edit [image] <OLE Object> [image] Convert

{OLE.DisplayAsIcon 0|1}	Edit [image] <OLE Object> [image] Convert [image] Display As Icon

{OLE.DoVerb Action}	Edit [image] <OLE Object> [image] Play, Edit, or Open

{OLE.OpenEdit}	Alt+Double-click an OLE object to open it in the server application (instead of editing it in place)

{OLE.Update}	Edit [image] <OLE Object> [image] Update Link

{OLE.Option} is equivalent to Edit [image] <OLE Object> commands and to some options in the Object Inspector menus of OLE objects. Each command affects the selected OLE object. The type of OLE object determines what command equivalents affect it:

OLE type	Commands

Embedded	{OLE.DoVerb}, {OLE.Convert}, {OLE.Change_To_Picture}, {OLE.DisplayAsIcon}, {OLE.ActivateAs}

Linked	{OLE.DoVerb}, {OLE.Change_Link}, {OLE.Update}, {OLE.Convert}, {OLE.Change_To_Picture}, {OLE.DisplayAsIcon}, and {OLE.ActivateAs}

Example

This macro selects an OLE object named Embedded1, lets the user edit the data (in the OLE server), and then converts the object into a picture (disabling the OLE link).

{SELECTFLOAT Embedded1}

{OLE.DoVerb Edit}

{OLE.Change_To_Picture}

Related Topics


{ONERROR}

Syntax

{ONERROR BranchLocation, <MessageLocation>, <ErrorLocation>}

BranchLocation	=	first cell of the macro to run in case of an error

MessageLocation	=	cell in which to store any error message (optional)

ErrorLocation	=	cell in which to store the address of the cell containing the macro error (optional)

Normally, if an error occurs during macro execution, the macro ends and you see an error message. {ONERROR} tells Corel Quattro Pro to branch to a different location (BranchLocation) if an error is encountered and store the error message in MessageLocation for future reference. Corel Quattro Pro stores the location of the error in ErrorLocation. MessageLocation and ErrorLocation are optional. If MessageLocation is omitted, no error message will be displayed or stored.

Only one {ONERROR} command can be in effect at a time, so each time it is called, the most recent {ONERROR} replaces the previous one. If an error occurs, the {ONERROR} state is "used up" and must be redeclared. It is best to declare {ONERROR} at the very beginning of your macro, or at least before any procedure is likely to result in an error.

In general, {ONERROR} will not capture macro programming errors, such as an incorrect sequence of commands, or an attempt to call a nonexisting subroutine. Nor will it detect syntax errors within a macro itself, such as an error resulting from the incorrect use of a macro keyword.

Typical errors that {ONERROR} detects include

disk errors, such as a disk drive door left open, a full disk, or failure to find a file of a given name

attempts to copy to a protected cell when a notebook's protection property is enabled

attempts to insert a row that would push a nonblank cell off the bottom of the notebook

Example

The following macro uses {ONERROR} by first deliberately causing an error (trying to insert a row that would push text off the bottom of the notebook), and then beeps when that error occurs.

\G	{ONERROR _on_err,err_msg,err_loc}

{EditGoto A8192}

{PUTCELL "This is the end"}

{UP}

{BlockInsert.Rows C(0)R(0), "Entire"}

_on_err	{BEEP 5}

err_msg

err_loc

Related Topics


{OnlineService}

Syntax

{OnlineService ServiceName;Arguments}

ServiceName	=	A string indicating the type of online service to use.

Arguments	=	A string indicating the command-line to pass to the service.

Used to launches internet URL address from a QuickButton. Equivalent to Insert [image] QuickButton [image] Button Properties [image] Link to URL. (Also used when clicking Help [image] Corel Web Site.)

Example

{OnlineService Internet,"http://www.corel.com/products/wordperfect/cqp8/index.htm"}


{OPEN}

Syntax

{OPEN Filename,AccessMode}

Filename	=	file name

AccessMode	=	R, M, W, A, or L

{OPEN} establishes a connection to Filename so you can use other file-access macro commands ({READ}, {WRITE}, and so on) on it. There are four different access modes:

R (Read-Only)	Allows only reading from this file, ensuring no changes are made to it. {WRITE} and {WRITELN} cannot be used with a file opened as read-only.

M (Modify)	Opens an existing file for modification. All reading and writing commands can be used with a file opened for modification. You can also use this access mode to open a stream to a communications port (for example, "COM1") or a printer port (for example, "LPT1").

W (Write)	Opens a new file with the name given in {OPEN}. If a file already exists with that name, the existing file is erased. All reading and writing commands can be used with a file opened for writing.

A (Append)	Opens an existing file for modification. Allows writing to the selected file only, and positions the file pointer at the end of the file.

L (Locate)	Opens and closes a file to locate it.

Filename's full name and access path must be given, and the entire name must be in quotes. For instance, to open and modify the file DATA.TXT in the subdirectory called FILES on drive C, use the command {OPEN "C:\FILES\DATA.TXT",M}. If any part of the access path or file name is left out, the file might not be found.

Tip

Although {OPEN} can provide access to any type of file (including .WB3 spreadsheet files), Corel Quattro Pro's file-access macro commands are designed to work only with plain text files. Using these commands with any other file type is not recommended and can result in corruption of that file. Make a backup copy of your file before using {OPEN} on it.

Once {OPEN} runs successfully, Corel Quattro Pro skips to the next row of the macro and continues executing instructions there. {OPEN Filename,R}, {OPEN Filename,M}, and {OPEN Filename,A} fail if the file is not found. {OPEN Filename,W} fails if the supplied access path or file name is invalid. If {OPEN} fails, Corel Quattro Pro continues executing commands in the same cell as the {OPEN} command. (See the third macro below for an example.) You can use {ONERROR} to trap some errors that occur in {OPEN}.

Examples

The following example opens the file named MYDATA.TXT for reading. If the file does not exist in the default data directory, the command fails.

{OPEN "MYDATA.TXT",R}

The next example creates a file MYDATA.TXT on drive A for writing. If there is already a file on drive A with that name, it is erased. This command will fail only if there is no disk in drive A.

{OPEN "A:MYDATA.TXT",W}

The last example demonstrates how to do error trapping in an {OPEN} macro. When you press Ctrl+H, Corel Quattro Pro attempts to open the file C:\MYDIR\DATA.TXT. If that succeeds, the macro stops, since there are no more commands in the row below. If {OPEN} fails (meaning the file does not exist), the adjacent {BRANCH} runs. The subroutine _try_again then attempts to create the file. If that succeeds, the macro restarts, since {OPEN} should succeed now that the file has been created. If _try_again fails, probably an invalid directory path was given. Therefore, the adjacent {BRANCH} goes to _bad_dir, which displays a relevant error message with pertinent instructions.

\H	{OPEN "C:\MYDIR\DATA.TXT",M}{BRANCH _try_again}

{CLOSE}

_try_again	{OPEN "C:\MYDIR\DATA.TXT",W}{BRANCH _bad_dir}

{CLOSE}

{BRANCH \H}

_bad_dir	{EditGoto err_loc}{BEEP 4}

{PUTCELL "The directory C:\MYDIR\ does not exist."}

{DOWN}

{PUTCELL "Create it, then try again."}

{DOWN}

err_loc

Related Topics


{Optimizer.Option}

Command equivalent	Equivalent to Tools [image] Numeric Tools [image] Optimizer...
{Optimizer.Add Constraint#, Cell, <=|>=|=|Integer, Constant}	... Constraints [image] Add
{Optimizer.Answer_Reporting Cell}	... Options [image] Reporting [image] Answer Report Cells
{Optimizer.Auto-scale 0|1}	... Options [image] Automatic Scaling
{Optimizer.Change Constraint#, Cell, <=|>=|=|Integer, Constant}	... Constraints [image] Change
{Optimizer.Delete Constraint#}	... Constraints [image] Delete
{Optimizer.Derivatives Central|Forward}	... Options [image] Derivatives
{Optimizer.Detail_Reporting Cell}	... Options [image] Reporting [image] Detail Report Cells
{Optimizer.Estimates Quadratic|Tangent}	... Options [image] Estimates
{Optimizer.Linear 0|1}	... Optimizer [image] Options [image] Assume Linear
{Optimizer.Load_Model}	... Options [image] Load Model
{Optimizer.Max_Iters Value}	... Options [image] Max Iterations
{Optimizer.Max_Time Value}	... Options [image] Max Time
{Optimizer.Model_Cell Cell}	... Options [image] Load Model, Save Model
{Optimizer.Precision Value}	... Options [image] Precision
{Optimizer.Reset}	... Reset
{Optimizer.Save_Model}	... Options [image] Save Model
{Optimizer.Search Conjugate|Newton}	... Options [image] Search
{Optimizer.Show_Iters 0|1}	... Options [image] Show Iteration Results
{Optimizer.Solution_Cell SolutionCell}	... Goal [image] Solution Cell
{Optimizer.Solution_Goal Max|Min|None|Target Value}	... Goal
{Optimizer.Solve}	... Solve
{Optimizer.Target_Value Value}	... Target Value
{Optimizer.Tolerance Value}	... Options [image] Tolerance
{Optimizer.Variable_Cells Cell(s)}	... Variable Cells
{Optimizer.Option} is the command equivalent for Tools [image] Numeric Tools [image] Optimizer. It performs goal-seeking calculations and solves sets of linear and nonlinear equations and inequalities.

Constraint# refers to a constraint's order in the constraint list. Constant may be a value or a cell containing a value. The Value for Target_Value may also be a value or a cell. Use {Optimizer.Solve} after the other commands to calculate the solution.

To save an Optimizer model, use {Optimizer.Model_Cell Cell} {Optimizer.Save_Model}. To load a model, use {Optimizer.Model_Cell Cell}{Optimizer.Load_Model}

You can use {Optimizer?} or {Optimizer!} to display the Optimizer dialog box. {Optimizer?} lets the user manipulate the dialog box, whereas {Optimizer!} relies on the macro to manipulate it.

Example

The following macro sets up an Optimizer problem designed to maximize the formula in D6 by varying cells B8..B10. Seven constraints limit the solution. All options have been changed from their default settings. T2 and G13 are the upper-left cells of the report selections.

{Optimizer.Solution_cell A:D6}

{Optimizer.Solution_goal Max}

{Optimizer.Variable_cells A:B8..A:B10}

{Optimizer.Add 1,"A:D8..A:D8",<=,"1000"}

{Optimizer.Add 2,"A:B8..A:B8",>=,"100"}

{Optimizer.Add 3,"A:B9..A:B9",>=,"100"}

{Optimizer.Add 4,"A:B10..A:B10",>=,"100"}

{Optimizer.Add 5,"A:D8..A:D8",>=,"500"}

{Optimizer.Add 6,"A:D9..A:D9",<=,"900"}

{Optimizer.Add 7,"A:D10..A:D10",<=,"110000"}

{Optimizer.Max_Time 50}

{Optimizer.Max_Iters 300}

{Optimizer.Precision 5E-05}

{Optimizer.Linear 1}

{Optimizer.Show_Iters 1}

{Optimizer.Estimates Quadratic}

{Optimizer.Derivatives Central}

{Optimizer.Search Conjugate}

{Optimizer.Detail_Reporting A:T2..A:T2}

{Optimizer.Answer_Reporting A:G13..A:G13}

{Optimizer.Solve}

Related Topics


{Order.Option}

Command equivalent	Equivalent to ...

{Order.Backward}	Format [image] Object Order [image] Send Backward

{Order.Forward}	Format [image] Object Order [image] Bring Forward

{Order.ToBack}	Format [image] Object Order [image] Send to Back

{Order.ToFront}	Format [image] Object Order [image] Bring to Front

{Order.Option} is equivalent to Format [image] Object Order, which reorders overlapping objects in a chart or dialog window. Each command affects selected objects in the active window.

Related Topics


{Outline.Option}

{Outline.AutoOutline}	Creates an outline automatically on the current pane/page. Equivalent to Tools [image] Outline [image] Auto Outline.
{Outline.Group}	Groups rows or columns. If the cells are not an entire row or column, whichever one contains the most elements (rows or columns) will be grouped. Equivalent to Tools [image] Outline [image] Group.
{Outline.Ungroup}	Ungroups rows or columns. If the cells are not an entire row or column, whichever one contains the most elements (rows or columns) will be ungrouped. If the cells do not span the ENTIRE group, only those rows/columns that are inside the cells will be ungrouped. Equivalent to Tools [image] Outline [image] Ungroup.
{Outline.UngroupAll}	Destroys all groups on the current pane/page. Equivalent to Tools [image] Outline [image] Ungroup All.
{Outline.Expand}	Expands a collapsed group of rows or columns. If the cells are not an entire row or column and are inside a group, whichever one contains the most elements (rows or columns) and is inside a current group, will be expanded. Equivalent to Tools [image] Outline [image] Expand Group.
{Outline.Collapse}	Collapses an expanded group of rows or columns. If the cells are not an entire row or column and are inside a group, whichever one contains the most elements (rows or columns) and is inside a current group will be collapsed. Equivalent to Tools [image] Outline [image] Collapse Group.
{Outline.Hide 0|1}	Either hides or shows the outline in the current pane/page. Equivalent to Tools [image] Outline [image] Show Outline.
{Outline.Summary Above|Below, Left|Right}	Sets whether the summary will be above or below for row-based groups, and left or right for column based groups. Equivalent to Tools [image] Outline [image] Options.
{Outline.ToLevel Rows|Columns, Level}	Collapses or expands a group or rows or columns at a specific level. Equivalent to clicking [image] in the panel on the side or top of the notebook.


{Page.Property}

{Page.Property} is the command equivalent for Format [image] Sheet. Each command affects the active sheet(s). The next table lists the possible settings for Property. To display a property description with syntax, choose the property in the following list:

Property	Format [image] Sheet option

Conditional_Color	Conditional Color

Default_Width	Default Width

Display	Display

Name	Name

Protection	Protection

Tab_Color	Tab Color

Zoom_Factor	Zoom Factor

You can use {Page?} or {Page!} to display the Active Sheet dialog box. {Page?} lets the user manipulate the dialog box, whereas {Page!} relies on the macro to manipulate it.

Related Topics


{Page.Conditional_Color<.Option>}

{Page.Conditional_Color<.Option>}	Equivalent to Format [image] Sheet...
{Page.Conditional_Color "Enable, SmallVal, GreatVal, BelowColor, NormalColor, AboveColor, ERRColor"}	... Conditional Color
{Page.Conditional_Color.Above_Normal_Color 0-15}	... Conditional Color [image] Above Normal Color
{Page.Conditional_Color.Below_Normal_Color 0-15}	... Conditional Color [image] Below Normal Color
{Page.Conditional_Color.Enable Yes|No}	... Conditional Color [image] Enable
{Page.Conditional_Color.ERR_Color 0-15}	... Conditional Color [image] ERR Color
{Page.Conditional_Color.Greatest_Normal_Value Value}	... Conditional Color [image] Greatest Normal Value
{Page.Conditional_Color.Normal_Color 0-15}	... Conditional Color [image] Normal Color
{Page.Conditional_Color.Smallest_Normal_Value Value}	... Conditional Color [image] Smallest Normal Value
{Page.Conditional_Color.Option} is equivalent to thesheet property Conditional Color, which makes cells change text color (based on the value in the cell). Each color specified in these commands is a number from 0 to 15, corresponding to which color of the notebook palette to use (1 through 16).

Example

The following macro makes negative values red, values greater than 10,000 green, ERR cells cyan, and positive values less than 10,000 black (assuming the default notebook palette is used).

{Page.Conditional_Color "Yes,0,10000,4,3,5,7"}

Related Topics


{Page.Default_Width Width}

{Page.Default_Width Width} is equivalent to the sheet property Default Width. It sets the default column width of the active sheet. Width is the new column width in twips (a twip is 1/1440th of an inch).

Example

{Page.Default_Width "720"} makes the default column width a half inch (720 twips).

Related Topics


{Page.Display<.Option>}

{Page.Display<.Option>}	Equivalent to Format [image] Sheet...
{Page.Display DisplayZeros?(Yes|No), RowBorders?(Yes|No), ColumnBorders?(Yes|No), HorzGridLines?(Yes|No), VertGridLines?(Yes|No)}	... Display
{Page.Display.Borders "RowBorders?(Yes|No), ColumnBorders?(Yes|No)}	... Display [image] Border Options
{Page.Display.Borders.Column_Borders Yes|No}	... Display [image] Border Options [image] Column Borders
{Page.Display.Borders.Row_Borders Yes|No}	... Display [image] Border Options [image] Row Borders
{Page.Display.Display_Zeros Yes|No}	... Display [image] Display Zeros
{Page.Display.Grid_Lines "HorizGridLines?(Yes|No), VertGridLines?(Yes|No)"}	... Display [image] Grid Lines
{Page.Display.Grid_Lines.Horizontal Yes|No}	... Display [image] Grid Lines [image] Horizontal
{Page.Display.Grid_Lines.Vertical Yes|No}	... Display [image] Grid Lines [image] Vertical
{Page.Display.Option} is equivalent to the sheet property Display, which sets the display of zeros, borders, and grid lines. The arguments of {Page.Display} (which sets all options of the Display property in one command) use the same syntax as those in the {Page.Display.Option} commands. All {Page.Display} arguments take Yes|No string values.

Example

The following macro displays zero values on the sheet, but hides borders and grid lines.

{Page.Display "Yes,No,No,No,No"}

Related Topics


{Page.Name NewName}

{Page.Name NewName} is equivalent to the sheet property Name. It sets the name of the active sheet to NewName.

Related Topics


{Page.Protection<.Option>}
{Page.Protection<.Option>}}

{Page.Protection<.Option>}	Equivalent to Format [image] Sheet...
{Page.Protection "CellLocking?(Yes|No), ObjectLocking?(Yes|No)"}	... Protection
{Page.Protection.Cells Yes|No}	... Protection [image] Enable Cell Locking
{Page.Protection.Objects Yes|No}	... Protection [image] Enable Object Locking
{Page.Protection} is equivalent to the sheet property Protection. It enables or disables cell and object protection on the active sheet.

Related Topics


{Page.Tab_Color}
{Page.Tab_Color "Red, Green, Blue, UseRGB?"}

{Page.Tab_Color} changes the tab color of the active sheet; Red, Green, and Blue are integers from 0 to 255.

Related Topics


{Page.Zoom_Factor}
{Page.Zoom_Factor 10-400}

{Page.Zoom_Factor} is equivalent to the sheet property Zoom Factor (and the View [image] Zoom command), which sets the zoom factor of the active sheet (from 10% to 400%). This setting is for display only and does not affect printed output.

Related Topics


{PageViewGoto}

Switches from either the Objects Sheet or the sheet in Draft mode to Page View. Equivalent to View [image] Page.

Related Topics


{PANELOFF}

{PANELOFF} disables normal display of menus and prompts during macro execution when Corel Quattro Pro's Macro Suppress-Redraw property is set to None. It can significantly speed up execution for macros that use keystrokes to walk through menus, since it saves Corel Quattro Pro the time normally needed to draw its menus on the screen. Its effect is canceled by Corel Quattro Pro once the macro stops executing, so you need not worry about locking macro users out of the menus. To cancel its effect during macro execution, use {PANELON}.

{PANELOFF} does not disable menus created by {MENUCALL} and {MENUBRANCH} or subroutine calls that use menus or dialog boxes. Use this command with {WINDOWSOFF} to completely disable normal screen updating.

Related Topics


{PANELON}

{PANELON} enables display of menus and prompts that have been disabled with {PANELOFF}. {PANELON} has no effect if used without an accompanying {PANELOFF}. Therefore, it can be used repeatedly with no ill effects.

Use this command with {WINDOWSON} to completely restore normal screen updating.

Related Topics


{ParseExpert.Option}

The following commands correspond to the QuickColumns features accessed through Data [image] Data Tools [image] QuickColumns.

Command equivalent	Equivalent to Data [image] Data Tools [image] QuickColumns...
{ParseExpert.ApplyFormatting 0|1}	Equivalent to Tools [image] Data Tools [image] QuickColumns [image] Options [image] Apply Formatting to spreadsheet.
{ParseExpert.ColumnWidths 0|1}	Equivalent to Tools [image] Data Tools [image] QuickColumns [image] Options [image] Set spreadsheet column widths.
{ParseExpert.ConsecutiveAsOne 0|1}	Equivalent to Tools [image] Data Tools [image] QuickColumns [image] Options [image] Treat consecutive delimiters as one when Data Type is set to "Delimited".
{ParseExpert.DataType Fixed|Delimited}	Equivalent to Tools [image] Data Tools [image] QuickColumns [image] Options [image] Data Type.
{ParseExpert.DelimiterType Space|Tab|Comma|CommaQuote|Other}	Equivalent to Tools [image] Data Tools [image] QuickColumns [image] Options [image] Delimited when Data Type is set to "Delimited"
{ParseExpert.Go}	Equivalent to Tools [image] Data Tools [image] QuickColumns [image] Parse.
{ParseExpert.IgnoreNonConformingRows 0|1}	Equivalent to Tools [image] Data Tools [image] QuickColumns [image] Options [image] Ignore nonconforming rows when Data Type is set to "Fixed".
{ParseExpert.InputBlock InputBlock}	Equivalent to Tools [image] Data Tools [image] QuickColumns [image] Source [image] Block when InputType is set to Block instead of File.
{ParseExpert.InputFile Filename}	Equivalent to Tools [image] Data Tools [image] QuickColumns [image] Filename when InputType is set to File instead of Block.
{ParseExpert.InputType Block|File}	Equivalent to Tools [image] Data Tools [image] QuickColumns [image] Source.
{ParseExpert.JoinBrokenLines 0|1}	Equivalent to Tools [image] Data Tools [image] QuickColumns [image] Options [image] Join broken lines at, when Data Type is set to "Fixed".
{ParseExpert.LineLength Number}	Equivalent to Tools [image] Data Tools [image] QuickColumns [image] Options [image] Join broken lines at ??? lines, when Data Type is set to "Fixed".
{ParseExpert.LoadSettings}	Equivalent to Tools [image] Data Tools [image] QuickColumns [image] Load Settings.
{ParseExpert.OtherDelimiter DelimiterChar}	Equivalent to Tools [image] Data Tools [image] QuickColumns [image] Options [image] Other when Data Type is set to "Delimited".
{ParseExpert.OutputBlock OutputBlock}	Equivalent to Tools [image] Data Tools [image] QuickColumns [image] Destination [image] Block.
{ParseExpert.PageLength Number}	Equivalent to Tools [image] Data Tools [image] QuickColumns [image] Options [image] Set page length to ??? lines.
{ParseExpert.PageLengthEnabled 0|1}	Equivalent to Tools [image] Data Tools [image] QuickColumns [image] Options [image] Set page length to.
{ParseExpert.Restore}	Equivalent to Tools [image] Data Tools [image] QuickColumns [image] Restore.
{ParseExpert.SaveSettings}	Equivalent to Tools [image] Data Tools [image] QuickColumns [image] Save Settings.
{ParseExpert.SettingsFile Filename}	Equivalent to Tools [image] Data Tools [image] QuickColumns [image] Save Settings - the file itself..
{ParseExpert.Skip1stChar 0|1}	Equivalent to Tools [image] Data Tools [image] QuickColumns [image] Options [image] Skip 1st Character when Data Type is set to "Fixed".
{ParseExpert.TextQualifier SingleQuote|DoubleQuote|None}	Equivalent to Tools [image] Data Tools [image] QuickColumns [image] Options [image] Text Qualifier when Data Type is set to "Delimited".
{ParseExpert.ValueQualifier SingleQuote|DoubleQuote|None}	Equivalent to Tools [image] Data Tools [image] QuickColumns [image] Options [image] Value Qualifier when Data Type is set to "Delimited".


{Parse.Option}

Command	Description
{Parse.Create}	Use to build the format line.
{Parse.EditLine}	Lets you specify a new format line.
{Parse.Go}	Use after setting up input and output cells and creating a format line.
{Parse.Input Block}	Indicates the cells to parse.
{Parse.Output Block}	Indicates the cells to hold parsed data.
{Parse.Reset}	Clears previous settings.
{Parse.Option} breaks long text strings into data fields according to a format line. This command is the equivalent of choosing Quattro Pro--DOS in Tools [image] Settings [image] Macro [image] Slash Key, then clicking / [image] Tools [image] Parse.

{Parse.Create} and {Parse.EditLine} act on the active cells.

Examples

The macro in the next figure selects text cells, builds a format line in the first line of the selected cells, identifies the format line and text as the parse input cells, specifies an output cells, and performs the parse:

A	B	C	D	E	F	G	H

6	V>>>*L>>>>>*L>>>******L>>>>>>>>>>*L	{SelectBlock A:A6..A:D7}

7	1968 Davis, John      Harisburg,  PA	{Parse.Input A:A6..A:D7}

8	1972 Lee,   Elizabeth New York,   NY	{Parse.Output A:A10}

9	{Parse.Create}

10	{Parse.Input A:A7..A:D8}

11	1968	Davis,	John	Harrisburg,	PA	{Parse.Output A:A11}

12	1972	Lee,	Elizabeth	New York,	NY	{Parse.Go}

To use {Parse.EditLine}, follow the macro with a {CLEAR} macro command, then the string for the new format line, and a {CR} macro, as shown in the following example:

{Parse.EditLine}{CLEAR}V>>>*L>>>>>>>>>>******L>>>>>>>>>>*L{CR}

Related Topics


{PasteFormat}

Syntax

{PasteFormat LinkType}

LinkType	=	format to paste object as

{PasteFormat} is equivalent to Edit [image] Paste Special, which lets you paste data in a specific format (for example, an OLE object) into a notebook. Use LinkType to specify the paste format.

Example

{PasteFormat Bitmap} pastes the data in the Clipboard as a bitmap into the active notebook.

You can use {PasteFormat?} or {PasteFormat!} to display the Paste Special dialog box. {PasteSpecial?} lets the user manipulate the dialog box, whereas {PasteSpecial!} relies on the macro to manipulate it.

Related Topics


{PasteLink}

{PasteLink} is equivalent to using Edit [image] Paste Special to set up a DDE link to another application.

Related Topics


{PasteSpecial}

Syntax

{PasteSpecial <"Properties"|"","Formula Cells"|"", "Label cells"|"", "Number cells"|"", "Formula Values"|"", "Transpose"|"", "NoBlanks"|"", Cell_Comments >}

Properties	=	Properties to paste properties from Clipboard; "" otherwise

Formula Cells	=	Formula cells to paste from Clipboard, "" otherwise

Number Cells	=	Number cells to paste from Clipboard, "" otherwise

Formula Values	=	Pastes formula cells as values, "" otherwise

Transpose	=	Switches the position of entries (data listed in columns is placed in rows and vice versa), "" otherwise

NoBlanks	=	Avoids pasting blank cells from Clipboard; "" otherwise

Cell_Comments	=	Pastes cell comments; "" otherwise

{PasteSpecial} is equivalent to using Edit [image] Paste Special to paste certains aspects of Corel Quattro Pro data from the Clipboard.

You can use {PasteSpecial?} or {PasteSpecial!} to display the Paste Special dialog box. {PasteSpecial?} lets the user manipulate the dialog box, whereas {PasteSpecial!} relies on the macro to manipulate it.

Example

The following macro pastes properties, formula cells, and numbers from the Clipboard, and skips any blank cells.

{PasteSpecial Properties, Formula Cells,"",Number cells,"","",NoBlanks,""}

Related Topics


{PAUSEMACRO}

{PAUSEMACRO} is used with {DODIALOG} or a command equivalent invoked with ! to pause the macro so that the user can "finish up" whatever dialog box is displaying. Once the user finishes using the dialog box (by choosing OK, or canceling it), macro execution resumes with any macro commands following the {PAUSEMACRO}.

Tip

Use {PAUSEMACRO} only when a dialog box is displaying, Corel Quattro Pro is in FIND mode (using Tools [image] Data Tools [image] Notebook Query), or Corel Quattro Pro is in INPUT mode (using {RestrictInput.Option}). Otherwise, the macro pauses indefinitely.

Example

The following macro displays the Edit [image] Copy Cells dialog box, sets the From edit field to A1, activates the To edit field, and then waits for the user to complete the copy operation. Once the user finishes the dialog box, the macro beeps and moves down a cell.

_copy_a1	{BlockCopy!}

{ALT+F}

A1

{ALT+T}

{PAUSEMACRO}

{BEEP}{DOWN}

Related Topics


{PGDN}
{PGDN} and {PGUP}

Syntax

{PGDN <Number>},{PGUP <Number>}

Number	=	any positive integer or address of a cell containing a positive integer (optional)

{PGDN} and {PGUP} are equivalent to PgDn and PgUp, respectively. Use Number to specify how many times the operation is repeated; for example, {PGUP 7} is equivalent to pressing PgUp seven times.

Related Topics


{PlayPerfectScript}

Syntax

{PlayPerfectScript Filename}

Filename	=	name of a PerfectScript macro file to run

{PlayPerfectScript} is the command equivalent for Tools [image] Macro [image] Play [image] PerfectScript.

Related Topics


{POKE}

Syntax

{POKE DDEChannel, Destination, DataToSend}

DDEChannel	=	channel ID number of the application to send information to

Destination	=	location in the application that receives the information being sent

DataToSend	=	cells containing the information to send to the application

{POKE} sends information to an application that supports Dynamic Data Exchange (DDE). This application is identified by DDEChannel. The type of application determines what Destination is; the destination could be cells in Excel or a bookmark in Word for Windows. DataToSend refers to cells containing the information to send. You must use the command {INITIATE} to open a channel of conversation before you can use {POKE} (this also determines the value of DDEChannel).

Example

This example starts a conversation with TASKLIST.OVD, which is a file open in ObjectVision. It sets the ObjectVision field Task to the label stored in new_task, and unchecks the Completed check box. Then the new task is inserted into the task list. The command block contains an ObjectVision command not available in Corel Quattro Pro:

dde_channel	10

command	[@INSERT("tasks")]

exec_result	0

new_task	Call Jim re: task priorities

task_status	No

_new_vision	{INITIATE "VISION","TASKLIST.OVD",dde_channel}

{POKE dde_channel,"Task",new_task}

{POKE dde_channel,"Completed",task_status}

{EXECUTE dde_channel,+command,exec_result}

Related Topics


{Preview}

{Preview} is equivalent to File [image] Print Preview, which lets you preview a printout onscreen.

Related Topics


{Print.Option}

{Print.Option} is equivalent to the menu commands in the following list. To display specific command equivalents, choose one of the following.

Command equivalents for...

File [image] Page Setup

File [image] Page Setup [image] Named Settings

File [image] Print

File [image] Page Setup [image] Options

The command equivalent {Print.PrintReset} resets print settings in all the dialog boxes displayed by these commands.

You can use {Print?} or {Print!} to display the Spreadsheet Print dialog box. {Print?} lets the user manipulate the dialog box, whereas {Print!} relies on the macro to manipulate it.


File|Page Setup|Named Settings Command Equivalents
File [image] Page Setup [image] Named Settings Command Equivalents

File [image] Page Setup [image] Named Settings command equivalent	Equivalent to File [image] Page Setup [image] Named Settings...
{Print.Create NamedSetting}	... Add, ... Update
{Print.Delete NamedSetting}	... Delete
{Print.Use NamedSetting}	... Use
These command equivalents are equivalent to File [image] Page Setup [image] Named Settings. NamedSetting is the named print setting to affect. To update an existing named setting, use {Print.Create}. {Print.Delete} removes a named setting from the active notebook. {Print.Use} sets the current print settings to those stored under the name.

Related Topics


File|Page Setup Command Equivalents
File [image] Page Setup Command Equivalents

File [image] Page Setup command equivalent	Equivalent to File [image] Page Setup...
{Print.Options_Dialog}	Displays the Page Setup dialog.
{Print.Bottom_Margin Value}	... Print Margins [image] Bottom
{Print.CreateFooter Yes|No}	... Determines whether your print selection contains a footer.
{Print.CreateHeader Yes|No}	... Determines whether your print block contains a header.
{Print.Footer FooterString}	... Header/Footer [image] Footer
{Print.Footer_Margin Value}	... Print Margins [image] Footer
{Print.Footers_Font "Typeface, PointSize, Bold(Yes|No), Italic(Yes|No), Underline(Yes|No), Strikeout(Yes|No)"}	... Header/Footer [image] Footer Font
{Print.Header HeaderString}	... Header/Footer [image] Header
{Print.Header_Margin Value}	... Print Margins [image] Header
{Print.Headers_Font "Typeface, PointSize, Bold (Yes|No), Italic (Yes|No), Underline (Yes|No), Strikeout (Yes|No)"}	... Header/Footer [image] Header Font
{Print.Left_Margin Value}	... Print Margins [image] Left
{Print.PagesDown N}	... Determines how many pages long a print selection will occupy.
{Print.PagesAcross N}	... Determines how many pages wide a print selection will occupy.
{Print.Orientation Landscape|Portrait}	... Paper Type [image] Portrait or Landscape
{Print.Page_Breaks Yes|No}	... Print Margins [image] Break Pages
{Print.PageSetupReset}	... Load Defaults
{Print.Paper_Type PaperSize}	... Paper Type
{Print.Print_To_Fit Yes|No}	... Print Scaling [image] Print to Fit
{Print.Right_Margin Value}	... Print Margins [image] Right
{Print.Scaling 1-1000}	... Print Scaling [image] Scaling
{Print.Top_Margin Value}	... Print Margins [image] Top
These command equivalents are equivalent to File [image] Page Setup. When specifying a margin, the default measurement system is used (set in the Windows Control Panel). To use a specific measurement system, place in (for inches) or cm (for centimeters) after the new margin setting (see the example). The new setting is converted into the default measurement system.

Example

This macro sets the top and bottom margins to three centimeters, specifies landscape orientation, and sets the paper size to Legal.

{Print.Top_Margin "3 cm"}

{Print.Bottom_Margin "3 cm"}

{Print.Orientation Landscape}

{Print.Paper_Type "Legal 8 1/2 x 14 inch"}

Related Topics


File|Print Command Equivalents
File [image] Print Command Equivalents

File [image] Print command equivalent	Equivalent to File [image] Print...
{Print.All_Pages Yes|No}	... Notebook
{Print.Area Notebook | Selection | Current Sheet}	... specify Notebook, Sheet, or a Selection
{Print.Block Block}	... Selection
{Print.Copies Value}	... Copies
{Print.DoPrint}	... Print
{Print.DoPrintGraph}	... Print (selected chart)
{Print.GroupCopies 0|1}	...      Will "collate" copies when set to zero, and "group" copies when set to 1.
{Print.Start_Page_Number Value}	... From Range
{Print.PrinterSetup Printer; Port; PrintToFile (0|1); Filename; CancelOverwrite (0) | Replace (1) | Backup (2) | Append (3)}	...  Details
These command equivalents are equivalent to File [image] Print (for the commands available for print options, see File [image] Page Setup [image] Options.) {Print.DoPrint} prints the active notebook (or active chart) using current print settings. {Print.DoPrintGraph} provides a quick way to print a chart. If a floating chart is selected, {Print.DoPrintGraph} prints the chart being shown; if a chart icon is selected, {Print.DoPrintGraph} prints the chart represented by that icon; if a chart window is active, {Print.DoPrintGraph} prints the chart shown.

Examples

This macro selects an icon on the Objects sheet named Report3 and prints the chart it represents.

{OBJECTSPAGEGOTO}

{SELECTOBJECT Report3}

{Print.DoPrintGraph}

This macro prints pages 7 through 12 of a document. The print selection is A3..C234.

{Print.Block A3..C234}

{Print.All_Pages No}

{Print.Start_Page_Number 7}

{Print.End_Page_Number 12}

{Print.DoPrint}

Related Topics


File|Page Setup|Options Command Equivalents
File [image] Page Setup [image] Options Command Equivalents

File [image] Print [image] Options command equivalent	Equivalent to File [image] Page Setup [image] Options...
{Print.Between_Block_Formatting "Lines"|"Page Advance"}	... Print Between Selections
{Print.Between_Page_Formatting "Lines"|"Page Advance"}	... Print Between 3D Pages
{Print.Cell_Formulas Yes|No}	... Print Options [image] Cell Formulas
{Print.Center_Block Yes|No}	... Print Options [image] Center Cells
{Print.Left_Heading Block}	... Left Heading
{Print.Lines_Between_Blocks Value}	... Print Between Selections [image] Lines
{Print.Lines_Between_Pages Value}	... Print Between 3D Pages [image] Lines
{Print.Print_Borders Yes|No}	... Row/Column Borders
{Print.Print_Gridlines Yes|No}	... Gridlines
{Print.PrintOptionsReset}	... Load Defaults
{Print.Top_Heading Block}	... Top Heading
{Print.PrintReset}	Resets all print settings
These command equivalents are equivalent to the options available in the Spreadsheet Print Options dialog box (click File [image] Page Setup [image] Options). {Print.Between_Page_Formatting} and {Print.Lines_Between_Pages} control the amount of space left between notebook sheets (if the print selection spans multiple sheets).

{Print.Between_Block_Formatting} and {Print.Lines_Between_Blocks} control space between the selections that make up a noncontiguous print selection.

Example

This macro specifies that three lines should be printed between each notebook sheet (if the print selection spans multiple sheets), and that row and column borders should print.

{Print.Between_Page_Formatting "Lines"}

{Print.Lines_Between_Pages 3}

{Print.Print_Borders Yes}

Related Topics


{PTTESTM}

Syntax

{PTTESTM InBlock1, InBlock2, OutBlock, <Labels>, <Alpha>, <Difference>}

InBlock1	=	the first input cells containing a column or row of numeric values

InBlock2	=	the second input cells containing a column or row of numeric values

OutBlock	=	upper left cell of the output cells

Labels	=	1 if labels are located in the first column or row of the input cells; 0 if the input cells do not contain labels; the default is 0

Alpha	=	significance level of the test; the default is 0.05

Difference	=	hypothetical mean difference; the default is 0

{PTTESTM} performs a paired two-sample Student's t-Test for means. Each value from InBlock1 is paired with a value from InBlock2. InBlock1 and InBlock2 must have the same number of values.

{PTTESTM} is equivalent to the t-Test analysis tool.

Related Topics


{PTTESTV}

Syntax

{PTTESTV InBlock1,InBlock2,OutBlock,<Labels>,<Alpha>}

InBlock1	=	the first input cells containing a column or row of numeric values

InBlock2	=	the second input cells containing a column or row of numeric values

OutBlock	=	upper left cell of the output cells

Labels	=	1 if labels are located in the first column or row of the input cells; 0 if the input cells do not contain labels; the default is 0

Alpha	=	significance level of the test; the default is 0.05

{PTTESTV} performs a Student's t-Test using two indepependent (rather than paired) samples with unequal variances. {PTTESTV} is equivalent to the t-Test analysis tool.

Related Topics


{PUT}

Syntax

{PUT Location,Column#,Row#,Value<:Type>}

Location	=	cells within which Value will be stored, either as a value or label, as specified by Type

Column#	=	number of columns into the specified cells to store Value

Row#	=	number of rows into the specified cells to store Value

Value	=	string or numeric value

Type	=	string or value; string (or s) stores the value or formula as a label, and value (or v) stores the actual value or value resulting from a formula (optional)

{PUT}, like {LET}, copies a value to a particular cell. However, instead of placing the value directly in the specified cell, {PUT} copies Value into the cell that is offset Column# columns and Row# rows into Location.

{PUT} processes Value the same way {LET} does, including the use of :string (or :s) and :value (or :v). If neither of these two optional arguments is supplied, {PUT} tries to store the value as a numeric value; if unsuccessful, it stores the value as a label.

The values for Column# and Row# can be any number between 0 and one less than the number of columns or rows within Location, respectively. A value of 0 implies the first column or row, 1 implies the second, and so on. If Column# or Row# exceeds the number of columns or rows in the cells, the macro stops. ({ONERROR} cannot trap this error.)

Examples

Each of the following examples assumes cell A41 contains the value 25, the selection named numbers has been defined as A44..B50, and data is a cell containing the value 295.

{PUT numbers,1,4,A41:value} copies the value 25 into the cell at the intersection of the second column and the fifth row of the cell numbers (cell B48).

{PUT numbers,1,5,A41:s} copies the string "A41" into the cell at the 2nd column and the 6th row of the cell numbers (cell B49).

{PUT numbers,1,6,data} copies the contents of the cell data to the 2nd column and 7th row of numbers (cell B50). If there is no selection named data, this example instead places a label ("data") into cell B50.

Related Topics


{PUTBLOCK}

Syntax

{PUTBLOCK Data,<Block>,<Date?(0|1)>}

Data	=	entry to type

Block	=	cells to type Data in (optional)

Date?	=	whether to enter Data as a date (1) or a label (0)

{PUTBLOCK} lets you quickly enter the same value, label, or formula in multiple cells. Data is a string or value to place in Block. If Block is not specified, the currently selected cells are used. Block can be noncontiguous; if so, be sure to enclose it in parentheses. If Data is a formula containing relative addresses, those addresses are adjusted automatically.

Examples

{PUTBLOCK "Quarter 1",A..D:A1} enters the label Quarter 1 in cells A:A1 through D:A1.

{PUTBLOCK 1990,A..D:B1} enters the value 1990 in cells A:B1 through D:B1.

{PUTBLOCK "+A1",C3..C12) enters the formula +A1 in C3, +A2 in C4, and so on.

{PUTBLOCK "11/01/94", (A:D3,B:D3,C:D3,D:D3),1} enters the date 11/01/94 in cell D3 of sheets A through D.

Related Topics


{PUTBLOCK2}

Syntax

{PUTBLOCK2 Data,<Block>}

Data	=	entry to type

Block	=	cells to type Data in (optional)

{PUTBLOCK2} enters the same value, label, or formula in multiple cells like {PUTBLOCK} but parses date formats automatically and requires a formula prefix before numeric values. Data is a string or value to place in Block. If Block is not specified, the currently selected cells are used. Block can be noncontiguous; if so, be sure to enclose it in parentheses. If Data is a formula containing relative addresses, those addresses are adjusted automatically.

Examples

{PUTBLOCK2 "Quarter 1",A..D:A1} enters the label Quarter 1 in cells A:A1 through D:A1.

{PUTBLOCK2 +1990,A..D:B1} enters the value 1990 in cells A:B1 through D:B1.

{PUTBLOCK2 "+A1",C3..C12) enters the formula +A1 in C3, +A2 in C4, and so on.

{PUTBLOCK2 "11/01/94", (A:D3,B:D3,C:D3,D:D3)} enters the date 11/01/94 in cell D3 of sheets A through D.

Related Topics


{PUTCELL}

Syntax

{PUTCELL Data,<Date?(0|1)>}

Data	=	string to type into the active cell

Date?	=	whether to enter Data as a date (1) or a label (0)

{PUTCELL} is an easy way to store information in the active cell.

Examples

{PUTCELL "Peggy Danderhoff"} stores Peggy Danderhoff as a label in the active cell.

{PUTCELL 45067} stores the number 45067 as a value in the active cell.

{PUTCELL "@SUM(A1..A27)"} stores the formula @SUM(A1..A27) in the active cell.

{PUTCELL "11/01/94",1} stores the date 11/01/94 in the active cell

Related Topics


{PUTCELL2}

Syntax

{PUTCELL2 Data}

Data	=	string to type into the active cell

{PUTCELL2} stores information in the active cell like {PUTCELL} but parses date formats automatically and requires a formula prefix before numeric values.

Examples

{PUTCELL2 "Peggy Danderhoff"} stores Peggy Danderhoff as a label in the active cell.

{PUTCELL2 +45067} stores the number 45067 as a value in the active cell.

{PUTCELL2 "@SUM(A1..A27)"} stores the formula @SUM(A1..A27) in the active cell.

{PUTCELL2 "11/01/94"} stores the date 11/01/94 in the active cell

Related Topics


{QGOTO}

{QGOTO} displays and selects the specified cells. This command is equivalent to the Go To key, F5. You can also use the command equivalent {EditGoto Block}. A related command, {GOTO}, moves to the upper-left cell of a destination cells, but does not select the cells.

Related Topics


{QUERY}

{QUERY} is equivalent to the Query key, F7, which repeats the Tools [image] Data Tools [image] Notebook Query operation performed.

Related Topics


{Query.Option}

Command equivalent	Equivalent to Tools [image] Data Tools [image] Notebook Query...
{Query.Assign_Names}	... Field Names
{Query.Criteria_Table Block}	... Criteria Table
{Query.Database_Block Block}	... Database Cells
{Query.Delete}	... Delete
{Query.Extract}	... Extract
{Query.Locate}	... Locate
{Query.Output_Block Block}	... Output Cells
{Query.Reset}	...  Reset
{Query.Unique}	... Extract Unique
{Query.Option} is equivalent to Tools [image] Data Tools  [image] Notebook Query, which lets you set up a Corel Quattro Pro database and search for records in that database. {Query.Locate} enters FIND mode and stays under macro control until {PAUSEMACRO} is used or {Query.EndLocate}, which exits FIND mode.

You can use {Query?} or {Query!} to display the Notebook Data Query dialog box. {Query?} lets the user manipulate the dialog box, whereas {Query!} relies on the macro to manipulate it.

Examples

The following macro sets up database cells and criteria table (A2..G37 and H1..H2), searches for records using the criteria table, sets up an output cells at J2..P2, and copies any records found there.

{Query.Database_Block A2..G37}

{Query.Criteria_Table H1..H2}

{Query.Locate}

{Query.EndLocate}

{Query.Output_Block J2..P2}

{Query.Extract}

Related Topics


{QuickCorrect}

Syntax

{QuickCorrect Yes|No}

{QuickCorrect} is the command equivalent for Tools [image] QuickCorrect. It replaces common spelling errors and mistyped words; it can also be used to automatically expand abbreviations. {QuickCorrect Yes} activates the QuickCorrect feature; {QuickCorrect No} turns it off.


{QuickFilter.Go}

Syntax

{QuickFilter.Go CellReference; <OpCode1; Arg1; Conditional1; OpCode2; Arg2; Conditional2; OpCode3; Arg3>}

Performs QuickFilter operations on cells. Equivalent to Tools [image] QuickFilter, and then manipulating the QuickFilter buttons on a column header. If there are no optional args, then it is the same as "Show All." You can have 2, 5, or 7 optional args.

OpCode#	=	"equal to", or "not equal to", "greater than", "less than", "greater than or equal to", "less than or equal to", "begins with", "does not begin with", "ends with", "does not end with", "contains", "does not contain".

Arg#	=	can be numeric, or a string. Wildcards are not valid.

Conditional#	=	AND or OR

Examples:

{QuickFilter.Go A:A1}

Equivalent to "Show All". Flushes ALL filters associated with Column A

{QuickFilter.Go A:B5;equal to""}

Equivalent to "Blanks". Filters all rows out except for those with blanks in Column B.

{QuickFilter.Go A:F24;not equal to""}

Equivalent to "Non Blanks". Filters out all rows except for those without blanks in Column F.

Related Topics


{QuickFilter.Toggle}

{QuickFilter.Toggle <Block>}

Turns on/off QuickFilters for the current cells. Equivalent to Tools [image] QuickFilter.

Related Topics


{QuickFilter.TopGo}

Syntax

{QuickFilter.TopGo CellReference; <OpCode; Arg>}

Performs QuickFilter operations on cells. Equivalent to Tools [image] QuickFilter, and then manipulating the QuickFilter buttons on a column header. If there are no optional args, it is the same as "Show All."

OpCode	=	"top value", "top percent", "bottom value", "bottom percent"

Arg	=	must be numeric. Wildcards are not valid.

Examples:

{QuickFilter.TopGo A:C51;top value;10}

Equivalent to Top Ten Values. Filters out all rows except for those that contain the top 10 values in column C.

{QuickFilter.TopGo A:E17;bottom percent;23}

Equivalent to Bottom 23 Percent. Filters out all rows except for those that contain the bottom 23% in column E.

Related Topics


{QUIT}

{QUIT} ends all macro execution, and returns control of Corel Quattro Pro to the user.

Use {QUIT} in conjunction with {IF}, {LOOK}, {MENUBRANCH}, or {MENUCALL} to end a macro under user control.

Example

The following macro displays a menu that has a "Quit" option, which returns the user to Ready mode.

quit_menu	Continue	Quit

Keep going	Quit to Ready mode

{BRANCH \G}	{QUIT}

\G	{MENUBRANCH quit_menu}

Related Topics


{RANDOM}

{RANDOM} generates cells of random values drawn from a selected distribution. It is equivalent to the Random Number analysis tool. {RANDOM} has a different format for the following distribution types:

Uniform	every value has an equal probability of being selected.

Normal	has the qualities of a symmetrical, bell-shaped curve.

Bernoulli	has two possible outcomes, failure or success, represented by 0 and 1

Binomial	represents the distribution of successful outcomes in a given number of independent Bernoulli trials.

Poisson	the distribution of values in any interval depends on the length of the interval and the constant Lambda, the expected number of occurrences in an interval

Patterned	a pattern of repeated values and sequences.

Discrete	every value in designated cells has a specified probability of being selected (the cumulative probabilities equal 1).

Related Topics


{RANDOM} - Uniform Distribution

Syntax

{RANDOM OutBlock, Columns, Rows, 1, Seed, LowerBound, UpperBound}

OutBlock	=	upper left cell of the output cells

Columns 	=	a value indicating the number of random number sets to generate; default is the number of columns in OutBlock

Rows	=	a value indicating the number of rows of random numbers to generate for each column

1	=	indicates uniform distribution

Seed	=	starting number for the random number generation algorithm

LowerBound	=	a value indicating the lower bound on the set of numbers to generate

UpperBound	=	a value indicating the upper bound on the set of numbers to generate

When the Distribution argument equals 1, {RANDOM} generates random values drawn from a uniform distribution.

Related Topics


{RANDOM} - Normal Distribution

Syntax

{RANDOM OutBlock, Columns, Rows, 2, Seed, Mean, SDev}

OutBlock	=	upper left cell of the output cells

Columns 	=	a value indicating the number of random number sets to generate; default is the number of columns in OutBlock

Rows	=	a value indicating the number of rows of random numbers to generate for each column

2	=	indicates normal distribution

Seed	=	starting number for the random number generation algorithm

Mean	=	a value indicating the mean of the set of numbers to generate

SDev	=	a value indicating the standard deviation of the set of numbers to generate

When the Distribution argument equals 2, {RANDOM} generates random values drawn from a normal distribution.

Related Topics


{RANDOM} - Bernoulli Distribution

Syntax

{RANDOM OutBlock, Columns, Rows, 3, Seed, Prob}

OutBlock	=	upper left cell of the output cells

Columns 	=	a value indicating the number of random number sets to generate; default is the number of columns in OutBlock

Rows	=	a value indicating the number of rows of random numbers to generate for each column

3	=	indicates Bernoulli distribution

Seed	=	starting number for the random number generation algorithm

Prob	=	a value indicating the probability of success on each trial run; must be greater than or equal to 0 and less than or equal to 1

When the Distribution argument equals 3, {RANDOM} generates random values drawn from a Bernoulli distribution.

Related Topics


{RANDOM} - Binomial Distribution

Syntax

{RANDOM OutBlock, Columns, Rows, 4, Seed, Prob, Trials}

OutBlock	=	upper left cell of the output cells

Columns 	=	a value indicating the number of random number sets to generate; default is the number of columns in OutBlock

Rows	=	a value indicating the number of rows of random numbers to generate for each column

4	=	indicates binomial distribution

Seed	=	starting number for the random number generation algorithm

Prob	=	a value indicating the probability of success on each trial run; must be greater than or equal to 0 and less than or equal to 1

Trials	=	a value indicating the number of trials

When the Distribution argument equals 4, {RANDOM} generates random values drawn from a binomial distribution.

Related Topics


{RANDOM} - Poisson Distribution

Syntax

{RANDOM OutBlock, Columns, Rows, 5, Seed, Lambda}

OutBlock	=	upper left cell of the output cells

Columns 	=	a value indicating the number of random number sets to generate; default is the number of columns in OutBlock

Rows	=	a value indicating the number of rows of random numbers to generate for each column

5	=	indicates Poisson distribution

Seed	=	starting number for the random number generation algorithm

Lambda	=	a parameter to the Poisson distribution representing the expected number of events in each unit

When the Distribution argument equals 5, {RANDOM} generates random values drawn from a Poisson distribution.

Related Topics


{RANDOM} - Patterned Distribution

Syntax

{RANDOM OutBlock, Columns, Rows, 6, Seed, LowerBound, UpperBound, Step, RepeatNumber, RepeatSequence}

OutBlock	=	upper left cell of the output cells

Columns 	=	a value indicating the number of random number sets to generate; default is the number of columns in OutBlock

Rows	=	a value indicating the number of rows of random numbers to generate for each column

6	=	indicates patterned distribution

Seed	=	starting number for the random number generation algorithm

LowerBound	=	a value indicating the lower bound on the set of numbers to generate

UpperBound	=	a value indicating the upper bound on the set of numbers to generate

Step	=	increment value between LowerBound and UpperBound

RepeatNumber	=	a value indicating the number of times to repeat each value

RepeatSequence	=	a value indicating the number of times to repeat each sequence of values

When the Distribution argument equals 6, {RANDOM} generates random values drawn from a patterned distribution.

Related Topics


{RANDOM} - Discrete Distribution

Syntax

{RANDOM OutBlock, Columns, Rows, 7, Seed, InBlock}

OutBlock	=	upper left cell of the output cells

Columns 	=	a value indicating the number of random number sets to generate; default is the number of columns in OutBlock

Rows	=	a value indicating the number of rows of random numbers to generate for each column

7	=	indicates discrete distribution

Seed	=	starting number for the random number generation algorithm

InBlock 	=	one or more numeric cell values representing the input cells, which contain a range of values and their probabilities, each in a separate column

When the Distribution argument equals 7, {RANDOM} generates random values drawn from a discrete distribution.

Related Topics


{RANKPERC}

Syntax

{RANKPERC InBlock,OutBlock,<Grouped>,<Labels(0|1)>}

InBlock	=	input cells containing one or more columns or rows of numeric values

OutBlock	=	upper left cell of the output cells

Grouped	=	"C" to group results by column or "R" to group results by row; the default is "C"

Labels	=	1 if labels are located in the first column or row of the input cells; 0 if the input cells do not contain labels; the default is 0

{RANKPERC} returns the ordinal and percent rank of each value in InBlock. {RANKPERC} is equivalent to the Rank and Percentile analysis tool.

Related Topics


{READ}

Syntax

{READ #Bytes,Location}

#Bytes	=	number of bytes of characters to read from a file

Location	=	cell in which to store the characters read

{READ} reads #Bytes bytes of characters from a file previously opened using {OPEN} (starting at the current position of the file pointer), and stores them as a label in Location. The file is left unchanged, and the file pointer moves to the position following the last character read. (See {GETPOS} for a discussion of the file pointer.)

{READ} is similar to {READLN}, except for two differences. While {READLN} reads one line of characters (terminated by a carriage-return/linefeed pair), {READ} reads the precise number of characters specified. This lets you read, for example, fields within a record rather than an entire record. The second difference is that while {READLN} strips out the carriage-return/linefeed pair at the end of a line, {READ} manipulates these as if they were no different from other characters. If you use {READ} to read a file created by {WRITELN}, you will see two graphics characters at the end of each string read. These are the carriage return and linefeed characters. {READ} is best used only in conjunction with {WRITE}, or when you know the text file structure in detail.

If {READ} succeeds, macro execution continues in the cell below the cell containing the {READ} command; if {READ} fails, macro execution continues in the same cell.

Example

This macro opens a text file containing a phone directory database, and reads a name and phone number from the third record. The macro that created this text file is shown in the description of {WRITE}:

\L	{OPEN "A:PHONEDIR.PRN",R}

{SETPOS rec_length*(rec_number-1)}

{READ name_length,name}

{READ phone_length,phone}

{CLOSE}

rec_number	3

rec_length	28

name_length	14

phone_length	12

name	Hall, Sue Ann

phone	617-555-5678

Related Topics


{READLN}

Syntax

{READLN Location}

Location	=	cell in which to store the characters read

{READLN} is like {READ}, but instead of using a number of bytes to determine the amount of text to read, {READLN} reads forward from the current file pointer location up to and including the carriage-return/linefeed at the end of the line. Unlike {READ}, it does not read the carriage return/linefeed into the cell. (See {GETPOS} for a discussion of the file pointer.)

Use {READ} to read lines from a record-structured file, where the lines are of uniform length. {READLN} can read the contents of a file one row at a time, making formatting of the data easier than {READ}.

Like the other file-access macros, if {READLN} fails, the macro continues execution in the current cell. If it is successful, the macro skips to the row below, and execution continues there. {ONERROR} can be used to trap disk and file errors, such as a disk drive door being left open.

Example

The following macro opens the text file TEST.TXT, reads in a line, and calculates the length of the line by subtracting the starting position from the ending position, then subtracting 1 from the result. This adjustment is necessary because the carriage-return and linefeed characters found at the end of each line in a typical text file are stripped away by Corel Quattro Pro when the text is read into cells. The macro that created the file TEST.TXT is shown in the description of {WRITELN}.

\M	{OPEN "A:TEST.TXT",R}

{GETPOS start}

{READLN input}

{GETPOS end}

{CLOSE}

{LET num_char,+(end-start)-1}

start	0

end	22

num_char	21

input	This is a short line.

Related Topics


{RECALC}

Syntax

{RECALC Location,<Condition>,<Iteration#>}

Location	=	cells to recalculate

Condition	=	condition to be met before recalculation is halted (optional)

Iteration#	=	maximum number of times to recalculate Location trying to meet Condition (optional)

{RECALC} causes Corel Quattro Pro to recalculate a specified portion of the notebook in a row-by-row order. This is different from normal recalculation, where Corel Quattro Pro recalculates the entire notebook in natural order; that is, before a formula calculates, each cell it references is recalculated first.

With the optional Condition argument, you can tell Corel Quattro Pro to recalculate formulas in cells repeatedly until the specified condition is met. You can also supply Iteration# to specify the maximum number of times to recalculate formulas trying to satisfy Condition. To use Iteration#, Condition must also be supplied.

{RECALC} is useful for rapid recalculation of specified parts of a notebook, particularly when the notebook is so large that global recalculations would significantly slow your work.

{RECALC} overrides the recalculation method specified for the notebook, enforcing row-by-row recalculation. If all the formulas reference only cells above, or to the left in the same row, the notebook will be correctly calculated. If there are references to cells to the left and below, you must use {RECALCCOL}. If there are references to cells below or to the right in the same row as your formula, you must use {CALC} to recalculate the entire notebook.

{RECALC} displays the results of recalculation.

Tip

If there are formulas within the cells being recalculated that depend on formulas outside of the cells, they might not evaluate correctly. Make sure Location encompasses all the cells referenced by formulas within the cells.

Related Topics


{RECALCCOL}

Syntax

{RECALCCOL Location,<Condition>,<Iteration#>}

Location	=	cells to recalculate

Condition	=	condition to be met before recalculation is halted (optional)

Iteration#	=	maximum number of times to recalculate Location trying to meet Condition (optional)

{RECALCCOL} recalculates the specified portion of a notebook in column-by-column order. It is similar to {RECALC}, which recalculates row by row. See {RECALC} for information on when {RECALCCOL} is appropriate and when you need to use {CALC} instead.

Related Topics


{RefreshScreenOn} and {RefreshScreenOff}

{RefreshScreenOn} and {RefreshScreenOff} turn on or off the repainting of Corel Quattro Pro behind an active dialog box.


{REGRESS}

Syntax

{REGRESS InBlockY, InBlockX, YIntZero(0|1), Labels(0|1), Confidence, SumOutBlock, Residuals(0|1), StdResiduals(0|1), <ResidualOutBLock>, <ProbOutBlock>}

InBlockY 	=	input cells containing a single column of y values (the dependent variables)

InBlockX	=	input cells containing one or more columns of x values (the independent variables)

YIntZero 	=	1 if the y-intercept is 0 (the line of regression passes through the origin); 0 if the y-intercept is not 0

Labels	=	1 if labels are located in the first column or row of the InBlockY and InBlockX; 0 if the input selections do not contain labels

Confidence	=	a value indicating the confidence level to apply to the regression

SumOutBlock	=	upper left cell of the output cells for the summary table (allow at least seven columns)

Residuals	=	1 or 0; if 1, includes residuals in the output table

StdResiduals	=	1 or 0; if 1, includes standardized residuals in the output table

ResidualOutBlock	=	upper left cell of the output cells for the residuals table (allow at least four columns)

ProbOutBlock	=	upper left cell of the output cells for the probabilities table (allow at least two columns)

{REGRESS} performs multiple linear regression analysis. {REGRESS} is equivalent to the Advanced Regression analysis tool.

Related Topics


{Regression.Option}

Command equivalent	Equivalent to Tools [image] Numeric Tools [image] ...
{Regression.Dependent Block}	...Regression [image] Dependent
{Regression.Go}	...Regression [image] OK
{Regression.Independent Block}	...Regression [image] Independent
{Regression.Output Block}	...Regression [image] Output
{Regression.Reset}	...Regression [image] Reset
{Regression.Y_Intercept Compute|Zero}	...Regression [image] Y Intercept
{Regression.Option} is the command equivalent for Tools [image] Numeric Tools [image] Regression. It performs a regression analysis to show the relationship between a set of independent variables and a dependent variable.

{Regression.Dependent} indicates the dependent-variable cells. {Regression.Independent} defines the independent variables. In {Regression.Independent}, Block can be noncontiguous with one variable to a column. The dependent and independent selections must all have the same number of rows.

{Regression.Output} indicates where to store the table of regression results. {Regression.Y_Intercept} specifies whether to compute the Y-intercept, or set it to zero. You can use {Regression.Reset} to clear all settings. Use {Regression.Go} after the other command equivalents to perform the regression analysis. If data changes within the independent or dependent data selections, use {Regression.Go} again to calculate a new regression table.

You can use {Regression?} or {Regression!} to display the Linear Regression dialog box. {Regression?} lets the user manipulate the dialog box, whereas {Regression!} relies on the macro to manipulate it.

Example

The following macro sets these data selections: Independent, B2..D16; Dependent, F2..F16. The last statement performs the regression analysis and stores the results in the cells with upper-left cell H2.

{Regression.Independent A:B2..A:D16}

{Regression.Dependent A:F2..A:F16}

{Regression.Output A:H2}

{Regression.Go}

Related Topics


{REQUEST}

Syntax

{REQUEST DDEChannel,DataToReceive,DestBlock}

DDEChannel	=	DDE channel number of the application to receive data from

DataToReceive	=	information to receive from the application

DestBlock	=	cells to store the data received into

{REQUEST} gets information specified by DataToReceive from applications that support Dynamic Data Exchange (DDE). This information is stored in DestBlock. DataToReceive is a string representing the location of the data to receive in the other application. In Corel Quattro Pro, this could be cells such as A2..A7 or a property such as "(Application.Display)". If requesting a property, the property must be enclosed in parentheses. You must use {INITIATE} to open a channel of communication and obtain the value DDEChannel before using {REQUEST}.

If your conversation is not within a specific topic (in other words, you opened the channel using the command {INITIATE AppName,"System",DDEChannel}), you can use the following strings in DataToReceive, depending on the application:

Arguments for DataToReceive

String	Purpose

"SysItems"	A listing of all strings you can use with DataToReceive. You can use this command first to view other choices offered by AppName.

"Topics"	A listing of all topics open. For example, a list of open documents under Word for Windows.

"Status"	The current status of the application. For example, READY in Excel or EDIT in Corel Quattro Pro when a cell is being edited.

"Formats"	A list of all Clipboard formats supported by the application or DDE link.

"Selection"	A list of all items currently selected in the application. For example, in Excel cells A3..A47 could be selected.

Examples

This macro gets the major and minor version numbers of GroupWise, which is already running.

dde_channel	0

get_vernumber	{INITIATE "GroupWise","Command",dde_channel}

{REQUEST dde_channel,"GetOfficeData(ID;MajorVersion!)",G1}

{REQUEST dde_channel,"GetOfficeData(ID;MinorVersion!)",G2}

{TERMINATE dde_channel}

This macro gets information from the fields Task and Completed in ObjectVision file TASKLIST.OVD and stores the data in the active notebook.

dde_channel	10

command	[@NEXT("TASKS")]

exec_result	0

vision_task	Print out third quarter report

task_complete	Yes

_get_vision_task	{INITIATE "VISION","TASKLIST.OVD",dde_channel}

{REQUEST dde_channel,"Task",vision_task}

{REQUEST dde_channel "Completed",task_complete}

{EXECUTE dde_channel,+command,exec_result}

Related Topics


{RESIZE}

Syntax

{RESIZE x,y,NewWidth,NewHeight,<VertFlip?>,<HorizFlip?>}

x and y	=	xy coordinates of the new upper left corner, in pixels

NewWidth	=	the new width, in pixels, of the object or group

NewHeight	=	the new height, in pixels, of the object or group

VertFlip?	=	1 if the object or group is flipped vertically from its previous position

HorizFlip?	=	1 if the object or group is flipped horizontally from its previous position

{RESIZE} resizes all selected objects in the active window (dialog or chart window).

Related Topics


{ResizeToSame}

{ResizeToSame} is equivalent to Format [image] Resize To Same, which lets you resize selected objects in the dialog window to the same size as the first object selected.

Related Topics


{RESTART}

{RESTART} changes the current subroutine to the starting routine (or the main routine) by removing all preceding For loops and subroutine calls.

{RESTART} is typically used for error handling. If an application is already nested to near the maximum number of levels and a severe error occurs that requires the macro to end, {RESTART} ensures that additional subroutine calls can be made. If you use the {RESTART} command often, you may want to use {BRANCH} to run subroutines.

Related Topics


{RestrictInput.Option}

Command equivalent	Equivalent to...
{RestrictInput.Enter Block}	No equivalent menu command
{RestrictInput.Exit}	Any operation that ends INPUT mode
{RestrictInput.Enter} enters INPUT mode and stays under macro control until {PAUSEMACRO} is used or {RestrictInput.Exit}, which exits INPUT mode.

{RestrictInput.Option} confines selector movement to specific cells of unprotected cells.

You can use {RestrictInput?} or {RestrictInput!} to display the Restrict Input dialog box. {RestrictInput?} lets the user manipulate the dialog box, whereas {RestrictInput!} relies on the macro to manipulate it.

Related Topics


{RETURN}

{RETURN} ends the executing subroutine and returns control to the macro that called it. If the macro executing is not a subroutine, execution stops.

A {RETURN} command at the end of a subroutine is optional, since a macro automatically returns from a subroutine when it reaches a blank cell or a cell containing a value. {RETURN} is usually used with {IF} to return to the main macro if a certain condition is met.

See {Subroutine} for an example of using {RETURN}.

Related Topics


{RIGHT}
{RIGHT} and {R}

Syntax

{RIGHT <Number>} or {R <Number>)

Number	=	any positive integer (optional)

{RIGHT} and {R} are equivalent to the Right Arrow key. The optional argument Number moves the selector the corresponding number of columns to the right. You can also use cell references or cell names as arguments.

Example

{RIGHT}{RIGHT} moves right two columns.

{R 6} moves right six columns.

{RIGHT D9} moves right the number of columns specified in cell D9.

{RIGHT count} moves right the number of columns specified in the first cell of the selection named count.

Related Topics


{ROWCOLSHOW}

Syntax

{ROWCOLSHOW Block,Show?,Row or Col,FirstPane?}

Block	=	cells containing rows or columns to hide or show

Show?	=	1 to reveal rows or columns; 0 to hide rows or columns

Row or Col	=	1 to reveal or hide a row; 0 to reveal or hide a column

FirstPane?	=	1 to affect rows or columns in left or top window pane; 0 to affect them in the right or bottom window pane

{ROWCOLSHOW} lets you hide or reveal rows and columns (it is equivalent to the cell property Reveal/Hide). Show? specifies whether to reveal (1) or hide (0). Row or Col specifies whether to affect rows (1) or columns (0). Block contains the rows or columns to affect. FirstPane? is used when the active window is split into panes (using View [image] Split Window). To affect the columns or rows in the left or top pane, set FirstPane? to 1; to affect rows or columns in the right or bottom pane, set FirstPane? to 0.

Examples

{ROWCOLSHOW A:A..B,1,0,1} reveals columns A and B on sheet A.

{ROWCOLSHOW A:1..7,0,1,1} hides rows 1 through 7 on sheet A.

{ROWCOLSHOW A:1..7,1,1,0} reveals rows 1 through 7 on sheet A. If the window is split, the rows are revealed in the right or bottom pane.

Related Topics


{ROWHEIGHT}

Syntax

{ROWHEIGHT Block,FirstPane?,Set/Reset,Size}

Block	=	cells containing rows to resize

FirstPane?	=	1 to resize rows in left or top window pane; 0 to resize rows in right or bottom window pane

Set/Reset	=	0 to set the row height; 1 to reset the row height

Size	=	new height (in twips) if setting size; not needed if resetting size

{ROWHEIGHT} provides two ways to change the height of a row or rows (it is equivalent to the cell property Row Height). The rows to change are specified by Block. FirstPane? is used when the active window is split into panes (using View [image] Split Window). To resize the rows in the left or top pane, set FirstPane? to 1; to resize the rows in the right or bottom pane, set FirstPane? to 0.

Set/Reset specifies how to change the height. To set a row height, use this syntax: {ROWHEIGHT Block, FirstPane?, 0, Size}

Size is the new row height, in twips. The maximum height is ten inches (14,400 twips).

To reset a row to the default height (determined by font sizes in the row), use this syntax: {ROWHEIGHT Block, FirstPane?, 1}

Examples

{ROWHEIGHT A:1..A:2,1,0,1440} sets the height of rows 1 and 2 (on sheet A) to one inch (1,440 twips).

{ROWHEIGHT A:1..A:2,0,0,2160} sets the height of rows 1 and 2 (on sheet A) to one and a half inches (2,160 twips). If the window is split, the top or left pane is affected.

{ROWHEIGHT A:5,1,1} resets the height of row 5 (on sheet A) to the default height.

Related Topics


{SAMPLE}

Syntax

{SAMPLE InBlock,OutBlock,Type,Rate}

InBlock	=	one or more numeric or cell values representing the input cells

OutBlock	=	upper left cell of the output cells

Type	=	"P" to specify periodic sample; "R" to specify random sampling

Rate	=	a value indicating a sampling rate; if Type = "P", Rate indicates the periodic interval used for sampling; if Type = "R", Rate indicates the number of samples

{SAMPLE} returns a periodic or random sample from values in InBlock. {SAMPLE} is equivalent to the Sampling analysis tool.

Related Topics


{Scenario.Option}

Command equivalent	Equivalent to Tools [image] Scenario [image] Edit...
{Scenario.AddCells <Block>}	... Add
{Scenario.Capture ScenarioName}	... Capture
{Scenario.CaptureArea Area,Block}	... Modify [image] Capture Area
{Scenario.Close}	Closes a Scenario Manager session; no equivalent command
{Scenario.DeleteGroup GroupName}	... Modify [image] Delete
{Scenario.Find}	... Find
{Scenario.Highlight Highlight?(0|1), ChangeCellColor(0-15), ResultCellColor(0-15)}	... Highlight
{Scenario.NewGroup GroupName}	... Modify [image] New
{Scenario.Open}	Initializes a Scenario Manager session; no equivalent command
{Scenario.Remove ScenarioName}	... Delete
{Scenario.RemoveCells <Block>}	... Remove
{Scenario.RenameGroup OldGroupName,NewGroupName}	... Modify [image] Rename
{Scenario.Report AllGroups(0|1), LeftLabels(0|1), TopLabels(0|1), <Block>}	... Report
{Scenario.Show ScenarioName}	... Scenarios list
{Scenario.Update_On_Block Update?(0|1)}	... Modify [image] Options
{Scenario.UseGroup GroupName}	... Group Management
{Scenario.Option} is the command equivalent for Tools [image] Scenario [image] New. It lets you change values in a model, saving the conditions and results for different scenarios. {Scenario.Open} must be used prior to using other {Scenario.Option} commands; use {Scenario.Close} when you are finished using the Scenario Manager. For {Scenario.AddCells} and {Scenario.RemoveCells}, Block defaults to the currently selected cells. For {Scenario.Report}, Block defaults to the first empty sheet in the notebook.

You can use {Scenario?} or {Scenario!} to display the Scenario Manager dialog box. {Scenario?} lets the user manipulate the dialog box, whereas {Scenario!} relies on the macro to manipulate it.

Example

The following macro captures the base scenario and two additional scenarios for a car loan.

{Scenario.Open}

{Scenario.Capture Base Scenario}

{Scenario.Update}

{SelectBlock A:F4}

{PutCell ".096"}

{SelectBlock A:C5}

{PutCell "60"}

{Scenario.Find}

{Scenario.Highlight 1,7,9}

{Scenario.Capture APR96-60}

{Scenario.Update}

{SelectBlock A:F4}

{PutCell ".085"}

{SelectBlock A:C5}

{PutCell "48"}

{Scenario.Find}

{Scenario.Highlight 1,7,9}

{Scenario.Capture APR85-48}

{Scenario.Update}

{Scenario.Report 0,1,0}

{FileSaveAs "C:\COREL\SUITE8\DATA\CARS.WB3"}

{Scenario.Close}

Related Topics


{ScenarioExpert}

{ScenarioExpert} is the command equivalent for Tools [image] Scenario [image] New. The macro has no arguments. {ScenarioExpert} displays the first Scenario Expert dialog box.

Related Topics


{SCROLLOFF} and {SCROLLON}

{SCROLLOFF} and {SCROLLON} are equivalent to Scroll Lock off and Scroll Lock on, respectively.

Related Topics


{Search.Option}

Command equivalent	Equivalent to Edit [image] Find And Replace...
{Search.Block Block}	... Cellss
{Search.Case Any|Exact}	... Case Sensitive
{Search.Direction Column|Row}	... Columns First
{Search.Find String}	... Find
{Search.Look_In Condition | Formula | Value}	... Look In
{Search.Match Part|Whole}	... Match Whole
{Search.Next}	... Next
{Search.Previous}	... Previous
{Search.Replace}	... Replace button
{Search.ReplaceAll}	... Replace All
{Search.ReplaceBy String}	... Replace edit field
{Search.Reset}	... Reset
{Search.Option} is equivalent to Edit [image] Find And Replace, which searches for strings in the active sheet. Use {Search.ReplaceBy} to specify the replacement string; {Search.Replace} replaces the string.

You can use {Search?} or {Search!} to display the Find And Replace dialog box. {Search?} lets the user manipulate the dialog box, whereas {Search!} relies on the macro to manipulate it.

Example

The following macro searches the active sheet for 1993 in formulas and replaces it with 1994.

{Search.Reset}

{Search.Block ""}

{Search.Look_In Formula}

{Search.Match Part}

{Search.Find "1993"}

{Search.ReplaceBy "1994"}

{Search.ReplaceAll}

Related Topics


{SelectAll}

{SelectAll} is the command equivalent for Edit [image] Select All.


{SELECTBLOCK}

Syntax

{SELECTBLOCK Block, <ActiveCell>}

Block	=	coordinates of the cell(s) to select

ActiveCell	=	address of the cell within the cells to make active

{SELECTBLOCK} lets you select a contiguous or noncontiguous selection within the active notebook. The noncontiguous selections must be enclosed in parentheses.

Examples

{SELECTBLOCK A4..B23} selects the cells A4..B23 in the active notebook window.

{SELECTBLOCK (A:A1..A:B12,B:B13..B:C34)} selects the noncontiguous selections A:A1..A:B12, B:B13..B:C34.

Related Topics


{SELECTFLOAT}

Syntax

{SELECTFLOAT ObjectID1<,ObjectID2,...>}

ObjectIDx	=	name of the notebook object(s) to select

With {SELECTFLOAT} you can select floating objects in the active notebook window using their names. (To find the name of an object, view it and study its Object Name property.) Use {SELECTOBJECT} to select objects in a chart or dialog window.

Example

{SELECTFLOAT "Button1"} selects the macro button in the the active notebook window with the object name Button1.

Related Topics


{SELECTOBJECT}

Syntax

{SELECTOBJECT ObjectID1<,ObjectID2,...>}

ObjectIDx	=	identification number or name of the object(s) to select

With {SELECTOBJECT} you can select objects in the active window using their ID numbers or names. (To find the ID number of an object, view it and study its Object ID property. Its name is stored in its Name property.) Since {SELECTOBJECT} is context-sensitive, you can select controls in a dialog window, drawings in a chart window, or icons in the Objects sheet.

Example

{SELECTOBJECT 2,5,7} selects the objects in the active window with the IDs 2, 5, and 7.

Related Topics


{Series.Option}

Command equivalent	Equivalent to Chart [image] Series...
{Series.Data_Range SeriesNumber | "XAxisLabelSeries" | "LegendSeries", Block <,CreateIfNotExist? (0|1)>}	... Number or X-Axis or Legend
{Series.Delete SeriesNumber <,AndAllSeriesFollowing?>}	... Delete
{Series.Go}	... OK
{Series.Insert SeriesNumber, Block}	... Add
{Series.Label_Range SeriesNumber, Block <,CreateIfNotExist? (0|1)>}	[series Object Inspector] [image] Label Series
{Series.Legend SeriesNumber, LegendText}	[series Object Inspector] [image] Legend
{Series.Reverse_Series 1|0}	... Reverse Series
{Series.Swap_Row_Col 1|0}	... Row/Column Swap
{Series.Option} is equivalent to Chart [image] Series and options in a series Object Inspector, which creates or deletes chart series.

When you manipulate a series using command equivalents, the changes are not made until the command {Series.Go} is used. In all the commands, SeriesNumber is the number of the series to affect (1 for the first series, 2 for the second, and so on).

{Series.Data_Range} changes the values of an existing series. Block is the new cells that the series should take values from. If you are not sure whether the series exists, set CreateIfNotExist? to 1. Then the series will be created if it does not already exist. You can also use {Series.Data_Range} to set the x-axis series (use "XAxisLabelSeries") or set the legend series (use "LegendSeries").

{Series.Delete} removes an existing series. Set AndAllSeriesFollowing? to 1 if you also want to remove all series following SeriesNumber.

{Series.Insert} creates a new series. The series is inserted at the position specified by SeriesNumber. Block refers to the cells containing the new series' data.

{Series.Label_Range} sets up the labels for each value in a series. Block refers to the cells containing the labels. If you are not sure whether the series exists, set CreateIfNotExist? to 1. Then the series will be created if it does not already exist.

{Series.Legend} sets the legend text for a series (LegendText is the new text).

You can use {Series?} or {Series!} to display the Chart Series dialog box. {Series?} lets the user manipulate the dialog box, whereas {Series!} relies on the macro to manipulate it.

Tip

You can add series to a floating chart using {ADDSERIES}.

Example

The following macro creates a chart named Profit99 with two series. The series values are in A:A1..A27 and A:C1..C27. The series labels are in A:B1..B27 and A:D1..D27. The x-axis is stored in A:E1..E27.

{GraphNew Profit99}

{GraphEdit Profit99}

{Series.Data_Range 1,A:A1..A27,1}

{Series.Data_Range 2,A:C1..C27,1}

{Series.Label_Range 1,A:B1..B27}

{Series.Label_Range 2,A:D1..D27}

{Series.Data_Range "XAxisLabelSeries",A:E1..E27}

{Series.Go}

The following macro inserts a new series between the two series in the last example.

{GraphEdit Profit99}

{Series.Insert 2,A:G1..G27}

{Series.Go}

Related Topics


{SeriesManager}
{SeriesManager.Option}

Command equivalent	Equivalent to
{SeriesManager.Define Name, Formula, FormulaText, SeedText}	Edit [image] Fill [image] Define QuickFill [image] Create (Formula series)
{SeriesManager.Define Name, List, Repeating?(0|1), Value1 <,Value2, Value3,...>}	Data [image] Fill [image] Define QuickFill [image] Create (List series)
{SeriesManager.Go Name, Rows | Columns | Tabs, Block}	Equivalent to using the SpeedFill button on the Main Toolbar
{SeriesManager.Remove Name}	Eidit [image] Fill [image] Define QuickFill [image] Delete
{SeriesManager.Rename OldName, NewName}	Edit [image] Fill [image] Define QuickFill [image] Rename
{SeriesManager.Option} is the command equivalent for Data [image] Fill [image] Define QuickFill [image]. Use {SeriesManager.Define Name, Formula,...} to create a formula series and {SeriesManager.Define Name, List,...} to create a list series.

You can use {SeriesManager?} or {SeriesManager!} to display the Define Fill Series dialog box. {SeriesManager?} lets the user manipulate the dialog box, whereas {SeriesManager!} relies on the macro to manipulate it.

Examples

The following macro creates a SpeedFill series named "First of Month" that consists of the first day of each month in 1995, then fills a column starting at A:A2 with the dates.

{SeriesManager.Define "First of Month", List, No, "01/01/95", "02/01/95", "03/01/95", "04/01/95", "05/01/85", "06/01/95", "07/01/95", "08/01/95", "09/01/95", "10/01/05", "11/01/95", "12/01/95"}

{SpeedFill}

{SeriesManager.Go "First of Month",Columns, A:A2}

Related Topics


{SETGRAPHATTR}

Syntax

{SETGRAPHATTR FillColor,BkgColor,FillStyle,BorderColor,BoxType}

FillColor	=	new fill color of the selected object(s)

BkgColor	=	new background color of the selected object(s)

FillStyle	=	new fill style of the selected object(s)

BorderColor	=	new border color of the selected object(s)

BoxType	=	new border style of the selected object(s)

{SETGRAPHATTR} lets you quickly set the properties of all selected objects in the active chart window. If one of the arguments specified in the {SETGRAPHATTR} command is not appropriate for an object, that argument is ignored.

Each color (FillColor, BkgColor, and BorderColor) is in quotes, and specified in RGB format. For FillStyle, use any of the strings for that option in the appropriate Object Inspector.

BoxType specifies the new border style for the object; use any Border Style property string included in a chart Object Inspector.

Related Topics


{SETLCID}

Syntax

{SETLCID <LocaleID>}

LocaleID	=	value for a locale ID

{SETLCID} sets the locale ID to the default locale ID or to one specified by LocaleID. The locale ID is a fixed number which specifies language, separator character, and a variety of other international settings; use {SETLCID} to ensure that the automation controller is using the default ID or the ID of a specific target object.

For more details on using {SETLCID} and other OLE automation macro commands, Using OLE Automation Features.


{SETMENUBAR}

Syntax

{SETMENUBAR <SystemDefinition>}

SystemDefinition	=	cells containing a menu system definition

{SETMENUBAR} lets you specify which menu system displays on the menu bar. SystemDefinition refers to cells containing the new menu system definition.

You can use {SETMENUBAR} without an argument to restore the default Corel Quattro Pro menu system.

Examples

{SETMENUBAR "A3..C324"} makes the system defined in A3..C324 the active menu system.

Related Topics


{SETOBJECTPROPERTY}

Syntax

{SETOBJECTPROPERTY Object.Property,Value}

Object	=	object to alter property of

Property	=	property to alter

Value	=	new property setting (or another instance of Object.Property to copy the new setting from)

{SETOBJECTPROPERTY} can change the property settings of many Corel Quattro Pro objects. Selectable objects such as blocks and annotations can also be changed using {SETPROPERTY}. {SETOBJECTPROPERTY} can affect:

Dialog controls. Use this syntax to specify a control to manipulate in a dialog window: [Notebook]DialogName:ObjectID.Property. [Notebook] is optional. For example, the following macro sets the Fill Color property of the control Rectangle1 in the dialog ColorPick to red:

{SETOBJECTPROPERTY "ColorPick:Rectangle1.Fill_Color", "255,0,0"}

Chart objects. Use the same syntax as for dialog controls, but substitute the name of the chart in place of DialogName. For example, the following macro changes the size of a rectangle named ColorPick in the chart 1QTR92:

{SETOBJECTPROPERTY "1QTR92:ColorPick.Dimension", "0,0,25,25"}

Menu items. Use the syntax MenuPath.Property. See the description of {ADDMENU} for the syntax of MenuPath.

For example, the following macro disables File [image] Save in the active menu system:

{SETOBJECTPROPERTY "/File/Save.Disabled", "Yes"}

Value is the new setting for the property. You can also substitute another instance of Object.Property for this argument to copy property settings between objects. For example, this macro copies the text color of the active cells to the text color of A23:

{SETOBJECTPROPERTY "A23.Text_Color","Active_Block.Text_Color"}

See Property Reference for a list of properties you can use.

Related Topics


{SETPOS}

Syntax

{SETPOS FilePosition}

FilePosition	=	the number of bytes into a file to set the file pointer to

{SETPOS} moves the file pointer of a file previously opened using {OPEN} to the value FilePosition. (See {GETPOS} for a discussion of the file pointer.) FilePosition refers to the offset, in number of bytes, where you want to position the file pointer. Therefore, the first position in the file is numbered 0, not 1.

If no file is open when {SETPOS} is encountered (or some other problem occurs), macro execution begins with the next command in the same cell as {SETPOS}. If {SETPOS} succeeds, the rest of that cell's commands are ignored, and execution continues in the next row of the macro.

For an example using {SETPOS}, see {READ}.

Related Topics


{SETPROPERTY}

Syntax

{SETPROPERTY Property,Setting}

Property	=	string representing the property to change

Setting	=	string representing the setting to apply to the property

{SETPROPERTY} alters the properties of the active object (use {SELECTBLOCK}, {SELECTFLOAT}, or {SELECTOBJECT} to select objects).

To find Property, view the object and use the name of the control that sets the property. If the control name is more than one word, connect the words with underscores (_). See Property Reference for a list of properties you can use.

Examples

{SETPROPERTY "Text_Color", "3"} sets the selected cells' Text Color property to the fourth color on the notebook palette (the first color is 0).

The following macro selects the macro button named PushButton1 and renames it Button1.

name_float	{SELECTFLOAT "PushButton1"}

{SETPROPERTY "Object_Name","Button1"}

Related Topics


{SHIFT}

Syntax

{SHIFT+Key <Number>}

Key	=	keyboard macro command (PGUP, DOWN, and so on)

Number	=	number of times to repeat the operation (optional)

{SHIFT} emulates holding down the Shift key while pressing a keystroke. It is handy for selecting cells, portions of a text box, or parts of a formula being edited.

You can combine {ALT}, {CTRL}, and {SHIFT}. For example, {CTRL+SHIFT+S} is equivalent to pressing Ctrl+Shift+S, which displays a list of styles to apply to the selected cells.

Examples

{SHIFT+DOWN 5} emulates pressing the Shift key while moving down five cells.

{EDIT}{END}{SHIFT+LEFT 3} edits the active cell, and selects the last three characters of the cell contents.

Related Topics


{Slide.Option}

Command equivalent	Action

{Slide.Effect Effect}	Specifies the transition effect to use when displaying the next slide in a slide show; no equivalent command

{Slide.Goto SlideName}	Takes the active slide show directly to the slide SlideName; no equivalent command

{Slide.Next}	Advances the active slide show to the next slide; no equivalent command

{Slide.Previous}	Returns the active slide show to the previous slide; no equivalent command

{Slide.Run SlideShowName}	Tools [image] Slide Show [image] Play

{Slide.Speed 0-15}	Specifies the transition speed to use when displaying the next slide in a slide show; no equivalent command

{Slide.Time Time}	Specifies the time in seconds to display the next slide in a slide show; no equivalent command

{Slide.Option} lets you build, edit, and present graphic slide show sequences. Effect, Speed, and Time are the same options offered in the Slide Effect property in the Light Table window. {Slide.Effect}, {Slide.Speed}, {Slide.Time}, {Slide.Goto}, {Slide.Next}, and {Slide.Previous} can be in the spreadsheet macro which started the slide show, in a spreadsheet macro run from a chart button, or attached directly to a QuickButton or custom dialog box button.

Related Topics


{SlideShowExpert}

{SlideShowExpert} is the command equivalent for Tools [image] Slide Show [image] New. The macro has no arguments. {SlideShowExpert} displays the first Slide Show Expert dialog box.

Related Topics


{SolveFor.Option}

Command equivalent	Equivalent to Tools [image] Numeric Tools [image] Solve For...
{SolveFor.Accuracy Value}	... Accuracy
{SolveFor.Variable_Cell Cell}	... Variable Cell
{SolveFor.Formula_Cell Cell}	... Formula Cell
{SolveFor.Go}	... OK
{SolveFor.Max_Iters Value}	... Max Iterations
{SolveFor.Reset}	Clears all Solve For settings; no equivalent menu command
{SolveFor.Target_Value Value}	... Target Value
{SolveFor.Option} is the command equivalent for Tools [image] Numeric Tools [image] Solve For. It solves goal-seeking problems with one variable.

{SolveFor.Formula_Cell} indicates the location of the formula to evaluate. {SolveFor.Target_Value} is the goal to reach, either a number or a cell containing a number. {SolveFor.Variable_Cell} indicates the formula variable (a referenced cell) that can change to reach the target value.

{SolveFor.Max_Iters} and {SolveFor.Accuracy} control how many calculation passes to make and how closely the solution must match the target value. Use {SolveFor.Go} after the other commands. {SolveFor.Reset} clears previous settings.

You can use {SolveFor?} or {SolveFor!} to display the Solve For dialog box. {SolveFor?} lets the user manipulate the dialog box, whereas {SolveFor!} relies on the macro to manipulate it.

Related Topics


{Sort.Option}

Command equivalent	Equivalent to Tools [image] Sort...
{Sort.BlankCellsFirst 0|1}	Determines whether to filter blank cells to the top or not during a sort.  Equivalent to Tools [image] Sort [image] Options [image] Sort blank cells first.
{Sort.Block Block}	... Cells
{Sort.Data "Labels First"|"Numbers First"}	... Data. Determines whether to sort Labels or Numbers first.  Equivalent to Tools [image] Sort [image] Options [image] Sort Numbers Last.
{Sort.Go}	... OK
{Sort.Heading 0|1}	Determines whether the first row (or column, depending on sorting based on rows or columns) is used as column headings, or is part of the sort block.  Equivalent to Tools [image] Sort [image] Selection contains a heading.
{Sort.Key_1-5 Block}	... Column [image] 1st - 5th
{Sort.Labels "Character Code"|"Dictionary"}	... Labels. Specifies whether text sorts in Dictionary order (ordinary alphabetizing rules) or Character Code order (according to character number--for example, uppercase letters before lowercase). Not recordable. Retained for use with previous Quattro Pro version macros.
{Sort.Order_1-5 Ascending|Descending}	... Ascending [image] 1st - 5th
{Sort.PreviousSorts N}	Stores up to the last five sorts performed in current file. Equivalent to Tools [image] Sort [image] Previous Sorts.
{Sort.Reset}	... Reset
{Sort.Type "Left to Right" | "Top to Bottom"	Determines to sort row-wise or column-wise. Equivalent to Tools [image] Sort [image] Options [image] Sort.
{Sort.Option} is equivalent to Tools [image] Sort, which sorts the entries in cells. To perform the sort, use {Sort.Go} after the other sort command equivalents.

You can use {Sort?} or {Sort!} to display the Data Sort dialog box. {Sort?} lets the user manipulate the dialog box, whereas {Sort!} relies on the macro to manipulate it.

Example

The following macro sorts the cells A3..C40 using two sort keys (columns A and C). The sort is in ascending order, and values in a column are placed in a group before labels in the column. The labels are sorted in dictionary order.

{Sort.Reset}

{Sort.Block "A:A3..C40"}

{Sort.Type Top to bottom}

{Sort.Heading 0}

{Sort.Key_1 a25}

{Sort.Key_2 c23}

{Sort.Order_1 Ascending}

{Sort.Order_2 Ascending}

{Sort.BlankCellsFirst No}

{Sort.Data Numbers First}

{Sort.PreviousSorts -1}

{Sort.Labels Dictionary}

{Sort.Go}

Related Topics


{SPEEDFILL}

{SPEEDFILL} is equivalent to the QuickFill button [image] on the Toolbar. It fills the selected cells with sequential data, based on entries in the upper-left portion of the cells.

To create or modify a series used with QuickFill, use {SeriesManager.Option}.

Related Topics


{SpeedFormat}

Syntax

{SpeedFormat FmtName, NumFmt?(0|1), Font?(0|1), Shading?(0|1), TextColor?(0|1), Align?(0|1), LineDraw?(0|1), AutoWidth?(0|1), ColHead?(0|1), ColTotal?(0|1), RowHead?(0|1), RowTotal?(0|1), <SubTotals?(0|1)>}

FmtName	=	name of the format to apply

NumFmt?	=	1 to apply the numeric format; 0 otherwise

Font?	=	1 to apply the font; 0 otherwise

Shading?	=	1 to apply the shading; 0 otherwise

TextColor?	=	1 to apply the text color; 0 otherwise

Align?	=	1 to apply the alignment; 0 otherwise

LineDraw?	=	1 to apply the line drawing; 0 otherwise

AutoWidth?	=	1 to automatically size the columns; 0 otherwise

ColHead	=	1 to apply the column heading format; 0 otherwise

ColTotal?	=	1 to apply the column total format; 0 otherwise

RowHead?	=	1 to apply the row heading format; 0 otherwise

RowTotal?	=	1 to apply the row total format; 0 otherwise

SubTotals?	=	1 to apply the subtotal format; 0 otherwise

{SpeedFormat} applies the format FmtName to the selected cells; it is equivalent to Format [image] SpeedFormat or clicking the SpeedFormat button [image] on the Toolbar. The arguments NumFmt? through SubTotals? each specify a part of the format to apply; use 1 to apply the part or 0 to omit the part.

You can use {SpeedFormat?} or {SpeedFormat!} to display the SpeedFormat dialog box. {SpeedFormat?} lets the user manipulate the dialog box, whereas {SpeedFormat!} relies on the macro to manipulate it.

Tip

To add or remove formats, use {SpeedFormat.Option}.

Related Topics


{SpeedFormat.Option}

Command Equivalent	Equivalent to Format [image] SpeedFormat...
{SpeedFormat.Add Name, ExampleBlock}	... Add
{SpeedFormat.Remove Name}	... Delete
{SpeedFormat.Option} adds formats to the SpeedFormat dialog box, or removes them. {SPEEDFORMAT.Add} lets you specify a name for the new format and the example cells that define the format. {SpeedFormat.Remove} deletes a specified format.

Examples

The following macro adds a format named "Strauss" to the SpeedFormat dialog box. The format is based on the example cells A:C10..H25.

{SpeedFormat.Add "Strauss",A:C10..H25}

Related Topics


{SPEEDSUM}

Syntax

{SPEEDSUM Block}

Block	=	coordinates of the cells to sum, including blank cells for results

{SPEEDSUM} is equivalent to selecting cells and choosing the QuickSum button [image] from the Toolbar. Block includes rows and/or columns to sum, plus adjacent empty cells to hold the results; the default Block is the current selection.

Related Topics


{STEP}

{STEP} is equivalent to the Debug key, Shift+F2.

Related Topics


{STEPOFF}

{STEPOFF} exits Debug mode, which runs the macro in slow-motion for debugging. The macro then runs at normal speed.

See {STEPON} for more information.

Related Topics


{STEPON}

{STEPON} activates Debug mode, which runs macros one step at a time for debugging. When Corel Quattro Pro encounters a {STEPON} command, it pauses and waits for the user to press any key or click the mouse before it runs the next macro command and pauses again. Debug mode continues until {STEPOFF} is encountered or the macro ends.

{STEPON} is like using the Debug key (Shift+F2) to enter Debug mode, but you can embed it within a macro. The Debug key must be used before a macro begins executing.

Example

This example uses {STEPON} and {STEPOFF} to debug the last routine of a macro. Notice that the empty pairs of braces, placed at the beginning and end of the routine, make it easy to add {STEPON} and {STEPOFF} commands when there is a problem, because you can delete them when you want to debug, and insert them when you do not.

_clean_up	{; Save notebook to disk and say goodbye}

{ }{STEPON}

{FileSave}

{BRANCH _quit_msg}

_quit_msg	{ }{STEPOFF}

{QUIT}

Related Topics


{Subroutine}

Syntax

{Subroutine <ArgumentList>}

Subroutine	=	name of the subroutine being called (which can be a cell name or a cell address)

ArgumentList	=	list of one or more arguments to be passed to the specified subroutine (optional)

{Subroutine} calls the subroutine of the specified name, passing along any arguments given in ArgumentList. (Those arguments are then defined within the subroutine using the {DEFINE} command.)

Any macro can be a subroutine. The macro commands in the subroutine run until {RETURN}, a blank cell, or a value is encountered. Then Corel Quattro Pro returns control to the calling routine, continuing execution with the macro command in the next cell. If the subroutine ends with {QUIT}, both the subroutine and the calling macro(s) end.

Example

The following example invokes a subroutine that forces the user to verify printing twice before it begins.

_print	{GETLABEL "Do you want to print this (Y/N)?",ans_cell}

{IF @UPPER(ans_cell)="Y"}{_chk_twice}

{HOME}

_chk_twice	{; Double-check the print request}

{GETLABEL "Are you certain (Y/N)?",ans_cell}

{IF @UPPER(ans_cell)="N"} {RETURN}

{GETLABEL "Ready to print now (Y/N)?",ans_cell}

{IF @UPPER(ans_cell)="Y"}{Print.DoPrint}

{RETURN}

ans_cell	Y

Related Topics


{TAB}

Syntax

{TAB <Number>}

Number	=	any positive integer or the address of a cell containing a positive integer (optional)

{TAB}, like {BIGRIGHT}, is equivalent to the Tab key, which moves one cell to the right.

Tip

When the Compatible Keys option of Tools [image] Settings [image] General is checked, {TAB} selects the leftmost cell of the screen that is to the right of the current one.

The optional argument Number specifies how many times to repeat the operation; for example, {TAB 2} is equivalent to pressing Tab twice.

Related Topics


{TabControl.Option}

Command Equivalent	Equivalent to Properties [image] Page List...
{TabControl.Add_Page TabControlName, Position}	Add
{TabControl.Delete_Page TabControlName, TabButtonName}	Delete
{TabControl.Insert_Page TabControlName, Position}	Insert
{TabControl.Move_Page TabControlName, TabButtonName,Up|Down}	Move
{TabControl.SelectPage TabControlName, TabButtonName}	Select a named sheet
{TabControl.Option} is equivalent to Properties [image] Page List, which lets you add, remove, and rearrange tabs in the current tab control.


{TABLE}

{TABLE} is equivalent to the Table key, F8, which repeats the last Tools [image] Numeric Tools [image] What-If operation.

Related Topics


{TableLink.Option}

Command equivalent	Equivalent to Insert [image] External Data [image] Table Link...
{TableLink.Block Block}	...  Cells
{TableLink.Name TableName}	...  Table
{TableLink.Go}	...  OK
{TableLink.Option} is the command equivalent Insert [image] External Data [image] Table Link. It establishes a link to an external database table and displays the table in a Corel Quattro Pro notebook.

You can use {TableLink?} or {TableLink!} to display the Table Link dialog box. {TableLink?} lets the user manipulate the dialog box, whereas {TableLink!} relies on the macro to manipulate it.

Related Topics


{TableQuery.Option}

Command equivalent	Equivalent to Insert [image] External Data [image] Table Query...
{TableQuery.Destination Block}	... Destination
{TableQuery.FileQuery Yes|No}	... Query in File
{TableQuery.Go}	... OK
{TableQuery.QueryBlock Block}	... QBE Selection
{TableQuery.QueryFile Filename}	... QBE File
{TableQuery.Option} is equivalent to Insert [image] External Data [image] Table Query, which lets you search external databases for records. The query is not performed until {TableQuery.Go} is used.

You can use {TableQuery?} or {TableQuery!} to display the Table Query dialog box. {TableQuery?} lets the user manipulate the dialog box, whereas {TableQuery!} relies on the macro to manipulate it.

Examples

The following macro searches the external table TASKLIST.DB using the query file TASKLIST.QBE. The results of the search are stored in A:A2.

{TableQuery.FileQuery Yes}

{TableQuery.QueryFile TASKLIST.QBE}

{TableQuery.Destination A:A2}

{TableQuery.Go}

The next macro searches the same database, but uses the query defined in the named cell task_query.

{TableQuery.FileQuery No}

{TableQuery.QueryBlock task_query}

{TableQuery.Destination A:A2}

{TableQuery.Go}

Related Topics


{TableView}

{TableView} is equivalent to Insert [image] External Data [image] Database Desktop, which launches the Database Desktop.

Related Topics


{TemplateTB.Option}

Command Equivalent	Description
{TemplateTB.Add Name, Path}	Adds a new Template Toolbar
{TemplateTB.Show Name}	Shows a Template Toolbar
{TemplateTB.Hide Name}	Hides a Template Toolbar
{TemplateTB.Remove Name}	Removes a Template Toolbar
{TemplateTB.Reset Name}	Resets a Template Toolbar to its default setup
{TemplateTB.Docking_Position Name, Top | Left | Right | Bottom | Floating}	Sets the docking position of a Template Toolbar
{TemplateTB.Rename Name, NewName}	Renames a Template Toolbar
{TemplateTB.Context Name, Desktop (Yes | No), Notebook (Yes | No), Chart (Yes | No), Dialog (Yes | No), Objects Page (Yes | No), Slide Show (Yes | No)}	Sets the contexts in Corel Quattro Pro in which a Template Toolbar appears
{TemplateTB.Option} is similar to {Toolbar.Option} except that it controls the Template Toolbar.


{TERMINATE}

Syntax

{TERMINATE DDEChannel}

DDEChannel	=	channel number of the DDE conversation to terminate

{TERMINATE} closes down a DDE conversation opened with {INITIATE}.

For an example using {TERMINATE}, see {EXECUTE}.

Related Topics


{Toolbar.Option}

Command equivalent	Equivalent to View [image] Toolbars...
{Toolbar.Add Name, Path}	Add
{Toolbar.Context Name, Desktop(1|0), Notebook(1|0), Chart(1|0), Dialog(1|0), Objects Page(1|0), Slide Show(1|0)}	Options [image] Visible in Context
{Toolbar.Docking_Position Name, Top | Left | Right | Bottom | Floating, Order}	Options [image] Docking Position
{Toolbar.Hide Name}	Hide
{Toolbar.Remove Name}	Remove
{Toolbar.Rename Name, NewName}	Options [image] Name
{Toolbar.Reset Name}	Reset
{Toolbar.Show Name}	Show
{Toolbar.Option} is the command equivalent for View [image] Toolbars.

{Toolbar.Docking_Position Order} is a numeric number used to position the selected toolbar in relation to other visible toolbars at the specified docking position:

-1	displays the specified toolbar at the end of toolbars at the specified docking position
0	displays the specified toolbar at the beginning of toolbars at the specified docking position
1	displays the specified toolbar 1 position in from the beginning of toolbars at the specified docking position
n	displays the specified toolbar n positions in from the beginning of toolbars at the specified docking position.
To record such macros as adding, positioning, and removing toolbars, right-click anywhere on a visible toolbar while recording a macro.


{TTESTM}

Syntax

{TTESTM InBlock1,InBlock2,OutBlock,<Labels>,<Alpha>,<Difference>}

InBlock1	=	one or more numeric cell values representing the first input cells

InBlock2	=	one or more numeric cell values representing the second input cells

OutBlock	=	upper left cell of the output cells

Labels	=	1 if labels are located in the first column or row of the input cells; 0 if the input cells do not contain labels; the default is 0

Alpha	=	significance level of the test; the default is 0.05

Difference	=	value indicating the hypothetical difference in the means between InBlock1 and InBlock2; the default is 0

{TTESTM} performs a Student's t-Test using two indepependent (rather than paired) samples with equal variances. {TTESTM} is equivalent to the t-Test analysis tool.

Related Topics


{UNDO}

{UNDO} "takes back" the last command given and restores the previous state for most commands.

Related Topics


{UngroupObjects}

{UngroupObjects} is the command equivalent for Format [image] Ungroup. It separates the selected group of chart annotation objects so each can be moved or modified without affecting the others.

Related Topics


{UP}
{UP} and {U}

Syntax

{UP <Number>} or {U <Number>}

Number	=	any positive integer (optional)

{UP} and {U} are equivalent to the Up Arrow key. The optional argument Number moves the selector up the corresponding number of rows. You can use cell references or cell names as arguments.

Example

{UP}{UP}{UP}	moves the selector up three rows.

{UP 4}	moves the selector up four rows.

{UP C13}	moves the selector up the number of rows specified in cell C13.

{UP temp}	moves the selector up the number of rows specified in the first cell of the selection named temp.

Related Topics


{VLINE}

Syntax

{VLINE Distance}

Distance	=	number of rows to scroll the active notebook vertically

{VLINE} scrolls the active notebook vertically by Distance rows. If the number is positive, it scrolls down; if negative, it scrolls up. {VLINE} does not move the selector; only the view of the notebook is altered. Use {DOWN} or {UP} to move the selector vertically.

Examples

{VLINE 11} scrolls the display 11 rows down.

{VLINE -4} scrolls the display 4 columns up.

Related Topics


{VPAGE}

Syntax

{VPAGE Distance}

Distance	=	number of screens to scroll the active notebook vertically

{VPAGE} scrolls the active notebook vertically by Distance screens. If the number is positive, it scrolls down; if negative, it scrolls up. {VPAGE} does not move the selector; only the view of the notebook is altered. Use the commands {PGDN} or {PGUP} to move the selector vertically.

Related Topics


{WAIT}

Syntax

{WAIT DateTimeNumber}

DateTimeNumber	=	the date and time at which macro execution can resume

{WAIT} pauses macro execution until the time corresponding to DateTimeNumber arrives. DateTimeNumber is a standard date/time serial number (both date and time portions must be included). If the current date is already later than the date specified in DateTimeNumber, macro execution continues immediately.

While execution is suspended, the macro is inactive, a WAIT indicator displays on the status line, and normal notebook operation can be restored only by pressing Ctrl+Break.

Examples

The following macro beeps, displays a "Go home" message, and suspends all execution until 8:00 a.m. the next day:

{BEEP 3}

{PUTCELL "Time to go home!"}

{DOWN}

{WAIT @TODAY+1+@TIMEVALUE("8:00 AM")}

This macro waits for one day:

{WAIT @NOW+1}

This macro uses {WAIT} to alert the user by sounding five short beeps, spaced two seconds apart:

\H	{FOR counter,1,5,1,_loop_here}

_loop_here	{BEEP 3}

{WAIT @NOW+@TIME(0,0,2)}

counter 6

Related Topics


{WaitCursorOn} and {WaitCursorOff}

{WaitCursorOn} and {WaitCursorOff} turn on or off the default Windows "busy" cursor.


{WhatIf.Option}

Command equivalent	Equivalent to Tools  [image] Numeric Tools [image] What-If...
{WhatIf.Block Block}	... Data Table
{WhatIf.Input_Cell_1 Cell}	... Input Cell (Column Input Cell)
{WhatIf.Input_Cell_2 Cell}	... Row Input Cell
{WhatIf.One_Way}	... One Free Variable, ...  Generate
{WhatIf.Reset}	... Reset
{WhatIf.Two_Way}	... Two Free Variables, ... Generate
{WhatIf.Option} is the command equivalent for Tools [image] Numeric Tools [image] What-If. It builds one- or two-variable "what-if" tables that display a range of results for different conditions.

If you are creating a one-variable table, use these command equivalents: {WhatIf.Input_Cell_1}, {WhatIf.Block}, {WhatIf.One_Way}. For two-variable tables, use {WhatIf.Input_Cell_2} after indicating the first input cell; use {WhatIf.Two_Way} instead of {WhatIf.One_Way}.

You can use {WhatIf?} or {WhatIf!} to display the What-If dialog box. {WhatIf?} lets the user manipulate the dialog box, whereas {WhatIf!} relies on the macro to manipulate it.

Example

The following macro defines A4..H18 as the "what-if" cells, B1 as Input Cell 1, B2 as Input Cell 2, and builds a two-variable table.

{Whatif.Block A:A4..A:H18}

{Whatif.Input_cell_1 A:B1}

{Whatif.Input_cell_2 A:B2}

{Whatif.Two_Way}

Related Topics


{WhatIfExpert}

{WhatIfExpert} is the command equivalent for Tools [image] Numeric Tools [image] What-If. The macro has no arguments. {WhatIfExpert} displays the first What-If Expert dialog box.

Related Topics


{WINDOW}

Syntax

{WINDOW<Number>}

Number	=	number of an open notebook window (1-9)

{WINDOW} switches to the specified open notebook window (1-9). This command is for compatibility with Corel Quattro Pro for DOS; use {ACTIVATE} to activate windows when developing macros for Corel Quattro Pro for Windows.

The argument Number is optional; {WINDOW} without an argument is equivalent to the Pane key, F6.

Related Topics


{WindowArrIcon}

{WindowArrIcon} is equivalent to Window [image] Arrange Icons, which lines up minimized windows on the Corel Quattro Pro desktop or icons on the Objects sheet.

Related Topics


{WindowCascade}

{WindowCascade} is equivalent to Window [image] Cascade, which rearranges all open windows on the Corel Quattro Pro desktop.

Related Topics


{WindowClose}

{WindowClose} is equivalent to Close in a Control menu, which closes the active window (if the active window is not saved, a prompt appears to confirm the operation).

Related Topics


{WindowHide}

{WindowHide} is equivalent to Window [image] Hide, which conceals the active notebook window.

Related Topics


{WindowMaximize}

{WindowMaximize} is equivalent to Maximize in a Control menu, which enlarges the active window so it fills the screen.

Related Topics


{WindowMinimize}

{WindowMinimize} is equivalent to Minimize in a Control menu, which shrinks the active window to an icon on the Corel Quattro Pro desktop.

Related Topics


{WindowMove}

Syntax

{WindowMove UpperLeftX, UpperLeftY}

UpperLeftX	=	distance between the left side of the Corel Quattro Pro window and the left side of active window, in pixels

UpperLeftY	=	distance between the bottom of the input line and the top of active window, in pixels

{WindowMove} is equivalent to Move in a Control menu, which lets you move the active window. UpperLeftX and UpperLeftY are the new coordinates of the upper-left corner of the window.

Related Topics


{WindowNewView}

{WindowNewView} is the command equivalent for Window [image] New View. It displays a duplicate copy of the active notebook in a new window.

Related Topics


{WindowNext}

{WindowNext} is equivalent to choosing Next in a Control menu or pressing Ctrl+F6. It makes the next window active.

Related Topics


{WindowPanes Horizontal | Vertical | Clear}
{WindowPanes}

Syntax

{WindowPanes Horizontal|Vertical|Clear, Synch?(0|1), <Width>, <Height>}

Synch?	=	whether the panes are synchronized: yes (1) or no (0)

Width	=	width of the left pane or height of the upper pane (optional)

Height	=	width of the right pane or height of the lower pane (optional)

{WindowPanes} is the command equivalent for View [image] Split Windows. It splits a notebook window into two horizontal or vertical panes; use Clear to restore a single pane.

Width and Height indicate the ratio relationship between the panes.

You can use {WindowPanes?} or {WindowPanes!} to display the Split Window dialog box. {WindowPanes?} lets the user manipulate the dialog box, whereas {WindowPanes!} relies on the macro to manipulate it.

Example

{WindowPanes Vertical,0,2,1} splits the notebook window into two vertical panes, not synchronized. The first pane is twice as wide as the second.

Related Topics


{WindowQPW.Option}

Command equivalent	Equivalent to the Corel Quattro Pro Control menu [image] ...
{WindowQPW.Maximize}	...  Maximize
{WindowQPW.Minimize}	...  Minimize
{WindowQPW.Restore}	...  Restore
{WindowQPW.Option} is the command equivalent for the Maximize, Minimize, and Restore commands on the Corel Quattro Pro Control menu.

{WindowQPW.Maximize} enlarges the Corel Quattro Pro window so it fills the screen.

{WindowQPW.Minimize} shrinks the Corel Quattro Pro window to an icon.

{WindowQPW.Restore} restores the Corel Quattro Pro window to its original size.

Related Topics


{WindowRestore}

{WindowRestore} is equivalent to Restore on the Control Menu. It restores minimized windows to their original size.

Related Topics


{WindowShow}

Syntax

{WindowShow Name}

Name	=	name of the hidden window to show

{WindowShow} is the command equivalent for Window [image] Show. It shows hidden window Name and makes it active.

You can use {WindowShow?} or {WindowShow!} to display the Show Window dialog box. {WindowShow?} lets the user manipulate the dialog box, whereas {WindowShow!} relies on the macro to manipulate it.

Related Topics


{WindowSize}

Syntax

{WindowSize X,Y}

X	=	new window width, in pixels

Y	=	new window height, in pixels

{WindowSize} is equivalent to Size in the Control menu. It sizes the active window to the specified width and height.

Related Topics


{WINDOWSOFF}

{WINDOWSOFF} disables normal screen updating during macro execution when Corel Quattro Pro's Macro Suppress-Redraw property is set to None. It can significantly speed up execution for most macros because it saves Corel Quattro Pro the time normally needed to redraw the screen each time a cell changes. Corel Quattro Pro cancels it once the macro stops executing, so the user is not "locked out" of the screen. To cancel its effect within the same macro, use {WINDOWSON}.

Use {WINDOWSOFF} with {PANELOFF} to completely disable normal screen updating.

Tip

After a {WINDOWSOFF} command, avoid letting users point to cells in response to an Edit command. The selector may be in a different cell than the "frozen" display indicates. If users must point to cells, precede it with a {WINDOWSON} command.

Example

The following macro uses {WINDOWSOFF} and {WINDOWSON} to turn off screen updating while Corel Quattro Pro sorts a list of vendors with the cell name vendor_name, thereby speeding up the sort operation.

sort_blk	vendor_name

key_nm	vendor_name

\W	{QGOTO}sort_message~

{WINDOWSOFF}

{_sort vendor_name}

{WINDOWSON}

_sort	{DEFINE sort_blk}

{Sort.Block @@(sort_blk)}

{BlockCopy sort_blk,key_nm}

{Sort.Key_1 @@(key_nm)}

{Sort.Order_1 "Ascending"}

{Sort.Go}

sort_message	SORT IS IN PROGRESS

vendor_name	General Cement Co.

Alveoli Mfg., Inc.

Sandab Development

Consolidated Dust

Related Topics


{WINDOWSON}

{WINDOWSON} reenables normal screen updating during macro execution, canceling the effects of a previous {WINDOWSOFF}. However, the screen will not be updated until {CALC} is encountered or the macro ends. If {WINDOWSON} is called when screen updating is already in effect, the command is ignored.

See {WINDOWSOFF} for an example using {WINDOWSON}.

Related Topics


{WindowTile Horizontal | Vertical | Both | Clear}
{WindowTile}

{WindowTile} is the command equivalent for Window [image] Tile. It displays all open windows without overlapping them.

Related Topics


{WindowTile.TopToBottom}

Tiles multiple files horizontally. Equivalent to Window [image] Tile Top To Bottom.


{WindowTitles}

Syntax

{WindowTitles Horizontal | Vertical | Both | Clear}

{WindowTitles Horizontal|Vertical|Both|Clear} is the command equivalent for View [image] Locked Titles. It locks specific rows and/or columns of a spreadsheet sheet onscreen as titles. When you scroll, the titles remain fixed onscreen while the rows below (or columns to the right) scroll as usual. "Horizontal" locks rows above the active cell, "Vertical" locks columns to the left of the active cell, and "Both" locks both rows and columns. Use "Clear" to unlock the titles.

You can use {WindowTitles?} or {WindowTitles!} to display the Locked Titles dialog box. {WindowTitles?} lets the user manipulate the dialog box, whereas {WindowTitles!} relies on the macro to manipulate it.

You can use {WindowTitles.Title} with @COMMAND, @PROPERTY, and @CURVALUE. For example, use @COMMAND{"WindowTitles.Title"} to determine whether locked titles are in use and display their type (Horizontal, Vertical, Both, or Clear). You can also use this command in macros to check for locked titles.

\A	{Calc} {If TitlesOn} {WindowTitles Clear} {Quit}

{WindowTitles Both}

TitlesOn    @COMMAND("WindowTitles.Title") = "Both"

Related Topics


{WorkSpace.Option}

Command equivalent	Equivalent to File [image] Workspace...

{Workspace.Restore Filename}	... Restore

{Workspace.Save Filename}	... Save

{Workspace.Save} saves all open notebooks as a group with the specified Filename (Corel Quattro Pro's default file extension for workspaces is .WBS). {Workspace.Restore} opens the specified file.

Related Topics


{WRITE}

Syntax

{WRITE String<,String2,String3,...>}

String	=	string of characters to be written into the open file

{WRITE} copies String to a file opened with the {OPEN} command, starting at the location of the file pointer. The file pointer is advanced to the position following the last character written, and the file's size increases if necessary. See {GETPOS} for a discussion of the file pointer.

{WRITE} does not place the carriage return and linefeed characters at the ends of lines. To include these characters, use {WRITELN}.

String can be a quoted string or text formula. If using more than one String, separate them with commas. For example, to write the label Dear Ms. followed by the contents of B6 into the file, use the following:

{WRITE "Dear Ms. ",+B6}

You can use an unlimited number of String arguments with {WRITE}.

If no file is open, or if there is insufficient room on the disk to increase the file's size, {WRITE} fails. Macro execution then continues with the first command after {WRITE} (in the same cell). If {WRITE} is successful, the rest of that cell's commands are ignored, and execution continues on the next row below.

If you try to reference a cell that does not contain a label, an error message displays.

Tip

After you finish accessing a file with {WRITE}, it must be closed with {CLOSE}. Otherwise, the file could become corrupted if the computer is turned off or otherwise interrupted.

Example

The following example creates a text file with fixed-length fields that will serve as a phone list database. After the macro runs, the file will look like this:

Golden, David 415-555-7774;Hack, Edmund  201-555-3511;Hall, Sue Ann 617-555-5678

See the description of {READ} to see how to read a file like this.

\K	{OPEN "A:PHONEDIR.PRN",W}

{WRITE "Golden, David "}

{WRITE "415-555-7774;"}

{WRITE "Hack, Edmund  "}

{WRITE "201-555-3511;"}

{WRITE "Hall, Sue Ann "}

{WRITE "617-555-5678"}

{CLOSE}

Related Topics


{WRITELN}

Syntax

{WRITELN String<,String2,String3,...>}

String	=	string of characters to be written into the open file as a single line

{WRITELN} copies String(s) to a file opened with {OPEN}, starting at the location of the file pointer, and ends the string(s) with the carriage-return and linefeed characters. The file pointer advances to the position following the last character written, and the file's size increases if necessary. (See {GETPOS} for a discussion of the file pointer.)

To enter a blank line in the file, use {WRITELN ""}. To enter characters without carriage-return/linefeed characters, use {WRITE}.

String can be a quoted string or a text formula. If using more than one String, separate them with commas. For example, to write the label Dear Ms. followed by the contents of B6 into the file you would use

{WRITELN "Dear Ms. ",+B6}

A carriage return and linefeed character are placed at the end of all strings combined, not after each. You can use an unlimited number of String arguments with {WRITELN}.

If no file is open, or if there is insufficient room on the disk to increase file's size, {WRITELN} fails. Macro execution then continues with the first command after {WRITELN} in the same cell. If {WRITELN} succeeds, the rest of that cell's commands are ignored, and execution continues on the next row below.

Tip

After you finish accessing a file with {WRITELN}, you must close the file with {CLOSE}. Otherwise, the file could become corrupted if the computer is turned off or otherwise interrupted.

Example

The following example shows how {WRITELN} is used to write a line of text to the file TEST.TXT. This line is terminated by the CR (carriage-return) and LF (linefeed) characters.

\Z	{OPEN "A:TEST.TXT",W}

{WRITELN "This is a short line."}

{CLOSE}

Related Topics


{ZOOM}

{ZOOM} maximizes and restores the active window.

This command is for compatibility with Corel Quattro Pro for DOS; use {WindowMaximize} and {WindowRestore} when developing macros for Corel Quattro Pro for Windows.

Tip

To change the zoom factor for a notebook or sheet, use {Notebook.Zoom_Factor} or {Page.Zoom_Factor}, respectively.

Related Topics


{ZTESTM}

Syntax

{ZTESTM InBlock1, InBlock2, OutBlock, <Labels(0|1)>, <Alpha>, <Difference>, <Variance1>, <Variance2>}

InBlock1	=	one or more numeric cell values representing the first input cells

InBlock2	=	one or more numeric cell values representing the second input cells

OutBlock	=	upper left cell of the output cells

Labels	=	1 if labels are located in the first column or row of the input cells; 0 if the input cells do not contain labels; the default is 0

Alpha	=	significance level of the test; the default is 0.05

Difference	=	a value indicating the hypothetical difference in the means between InBlock1 and InBlock2; the default is 0

Variance1	=	a value indicating the variance of data set one; the default is 0

Variance2	=	a value indicating the variance of data set two; the default is 0

{ZTESTM} performs a two-sample z-Test for means, assuming known variances for each sample. {ZTESTM} is equivalent to the z-Test analysis tool.

Related Topics


{Numeric Format Codes}
Numeric Format Codes

  Code	Description

    0-15	Fixed (0-15 decimals)

  16-31	Scientific (0-15 decimals)

  32-47	Currency (0-15 decimals)

  48-63	% (percent; 0-15 decimals)

  64-79 	, (comma; 0-15 decimals)

     112	+/- (bar chart)

     113	General

     114	Date [1] (DD-MMM-YYYY)

     115	Date [2] (DD-MMM)

     116	Date [3] (MMM-YYYY)

     117	Text

     118	Hidden

     119	Time [1] (HH:MM:SS AM/PM)

     120	Time [2] (HH:MM AM/PM)

     121	Date [4] (Long International)

     122	Date [5] (Short International)

     123	Time [3] (Long International)

     124	Time [4] (Short International)

     127	Default (set with Normal style)


To translate a Quattro Pro macro command to PerfectScript syntax
To translate a Corel Quattro Pro macro command to PerfectScript syntax,

1	Remove the opening brace of the Corel Quattro Pro macro command and replace the space just after command name with it. For example, change {BlockCopy A1..A20,C10} to BlockCopy{A1..A20,C10}.

For commands without arguments, move the opening brace to just before the closing brace. For example, change {DOWN} to DOWN{}.

2	Replace the braces with parentheses. For example, change DOWN{} to DOWN() and BlockCopy{A1..A20,C10} to BlockCopy(A1..A20,C10).

3	Change any periods in the command name to underscores. For example, change Print.Block(A1..A20) to Print_Block(A1..A20).

4	Change commas that separate arguments to semicolons.

5	If an argument is calculated using a formula, enclose the formula in an Eval() statement. For example, change BlockFill_Start(+A20*0.25) to BlockFill_Start(Eval("+A20*0.25")).

Note: Eval() works only in PerfectScript macros.

Now you can copy these commands into the application you are using to edit PerfectScript macros, such as Corel WordPerfect for Window.

Note: When you are converting Corel Quattro Pro macros to PerfectScript macros, the following Corel Quattro Pro macro commands must be replaced by the corresponding PerfectScript commands:

    Corel Quattro Pro   PerfectScript

    ---------------------------------------------------------

    {ABS}             AbsoluteReference()

    {ASSIGN}         AssignValue()

Related Topics


PerfectScript Macro Commands

Macro Command Lists

When you use the Corel Quattro Pro commands in PerfectScript, you need to use slightly different syntax than in Corel Quattro Pro. You can can translate Corel Quattro Pro commands to PerfectScript syntax. Or, you can record a macro as a PerfectScript macro, and then access a list of PerfectScript commands if you need to edit the macro.

To translate a Corel Quattro Pro macro command to PerfectScript syntax

To record a PerfectScript macro

To edit a PerfectScript macro by selecting commands from a list

Related Concepts


To print my own macros manual
To print my own macros manual,

1	Click Help Topics [image] Contents [image] Macro Command Reference.

2	Click the book that you want to print (such as Macros Index), then click the Print button.

3	Check your printer settings, then click OK.

Tips

Because Help prints one topic at a time and prints one topic per page, printing may take a lot of time and a lot of paper.

You can print topics one at a time by double-clicking a Print My Own Manual book, selecting a page item, then clicking Print.


New Macro Commands

New in Quattro Pro 8

Alert

Application.Property

Application_Display_Default_View

Application_Display_History_List

Application_Display_Min_Number_Sheets

Application_Display_Sheet_Tab_Label

Application_Display_Show_GroupBox_As_Line

Application_Display_Show_PreSelection

Application_File_Options_AutoRefreshTime

Application_File_Options_DoRefresh

Application_General_Calc_As_You_Go

Application_General_Cell_Reference_Checker

Application_General_Fit_As_You_Go

Application_General_QuickType

Audit_Remove_All_Arrows

Audit_Trace_Dependents

Audit_Trace_Precedents

ClearComments

Comment_Edit

Comment_EditURL

CrossTab

DatabaseQuery

DraftViewGoto

FileVersion_Retrieve

FileVersion_Retrieve_Current

FileVersionSave

InsertPageBreak.Option

Notebook.Summary.Option (changed from Summary.Option)

Outline.Option

PageViewGoto

ParseExpert.Option

Print.Option

Print_Create_Footer

Print_Create_Header

Print_Group_Copies

Print_Options

Print_Pages_Across

Print_Pages_Down

Print_PrinterSetup

QuickFilter_Go

QuickFilter_Toggle

QuickFilter_TopGo

Sort.Option

Sort_BlankCellsFirst

Sort_Heading

Sort_PreviousSorts

Sort_Type

WindowTile_TopToBottom

Obsolete in Quattro Pro 8

Application.Display.Clock_Display

DataModel

InsertBreak

Note that macros Summary_* changed to Notebook_Summary_*.

New in Quattro Pro 7

{AddSubMenuItem}

{ClearFormats}

{MapExpert}

{MapNew}

{Notebook.Summary.Option}

{PlayPerfectScript}

{QuickCorrect}

{SelectAll}

{TabCtrl.Option}

{TemplateTB.Option}


Keyboard Macro Commands

When you record a macro, Corel Quattro Pro translates special keystrokes into keyboard commands. When you type in a macro, use these commands in place of keystrokes. There are four categories:

Movement Keys

Home, End, and arrows

Function Keys

F1 through F12

Status Keys

Caps Lock, Scroll Lock, and other indicator keys

Other Keys

Break, Esc, Del, plus other keys and key combinations

Keyboard commands emulate the keys of the keyboard. You can repeat many of these macro commands by specifying a repeat number as an argument. For example, to move the selector down five cells, use {DOWN 5}.

You can combine key commands for a variety of purposes. For example, the following macro replaces a formula in the active cell with its result and then moves down one cell:

{EDIT}{CALC}~{DOWN}

The following macro deletes the last three characters of whatever is in the active cell:

{EDIT}{END}{SHIFT+LEFT 3}{DEL}{CR}

Tip

For compatibility with future versions of Corel Quattro Pro, use command equivalents to execute menu commands instead of using keyboard macros.

Related Topics


Movement Key Macro Commands

Use these macro commands in place of arrows and other movement keys:

{HOME}	Home

{END}	End

{LEFT} or

{L}	Left arrow

{RIGHT} or

{R}	Right arrow

{UP} or

{U}	Up arrow

{DOWN} or

{D}	Down arrow

{PGUP}	PgUp

{PGDN}	PgDn

{BIGLEFT} or

{BACKTAB}	Ctrl+Left arrow or Shift+Tab

{BIGRIGHT} or

{TAB}	Ctrl+Right arrow or Tab

Related Topics


Function Key Macro Commands

These macro commands are equivalent to Corel Quattro Pro function keys and key combinations:

{ABS}	F4

{CALC}	F9

{EDIT}	F2

{FUNCTIONS}	Alt+F3

{GRAPH}	F11

{HELP}	F1

{INSPECT}	F12

{MACROS}	Shift+F3

{MARK}	Shift+F7

{MENU}	F10

{NAME}	F3

{NEXTPANE}	F6

{NEXTTOPWIN}	Ctrl+F6

{NEXTWIN}	Shift+F6

{OBJECTSPAGEGOTO}	Shift+F5

{QGOTO}	F5

{QUERY}	F7

{STEP}	Shift+F2

{STEPOFF}	Shift+F2

{STEPON}	Shift+F2

{TABLE}	F8

Related Topics


Status Key Macro Commands

These macro commands are equivalent to the status indicator keys:

{CAPOFF}	Caps Lock off

{CAPON}	Caps Lock on

{INS} or {INSERT}	Toggles Ins on or off

{INSOFF}	Ins off

{INSON}	Ins on

{NUMOFF}	Num Lock off

{NUMON}	Num Lock on

{SCROLLOFF}	Scroll Lock off

{SCROLLON}	Scroll Lock on

Related Topics


Macro Commands for Other Keys

These macro commands are used for building key combinations and for entering or editing data:

{ALT}	The keystroke Key while Alt is held down

{BACKSPACE}

 or {BS}	Backspace

{BREAK}	Returns Corel Quattro Pro to Ready mode

{CLEAR}	Ctrl+Backspace (Clears any existing entry from a prompt line or from the input line in Edit mode)

{CR} or ~	Enter

{CTRL}	The keystroke Key while Ctrl is held down

{DATE}	Ctrl+Shift+D

{DEL} or {DELETE}	Del

{ESC} or {ESCAPE}	Esc

{SHIFT}	The keystroke Key while Shift is held down

Related Topics


Screen Macro Commands

These macro commands affect the display:

{BEEP}

Sounds the computer's bell.

{INDICATE}

Sets the mode indicator to display a specified string.

{PANELOFF}

Suppresses menus and prompts.

{PANELON}

Restores menus and prompts disabled by {PANELOFF}.

{WINDOWSOFF}

Prevents screen updating.

{WINDOWSON}

Restores screen updating disabled by {WINDOWSOFF}.

{ZOOM}

Maximizes or restores the active window.

Screen commands can control the status line, suppress screen redraws, or sound the computer's bell. For example, {INDICATE "WAIT"} changes the status line indicator to WAIT; {INDICATE} resets the status line to its default.

Related Topics


Cell Macro Commands

These macro commands affect the data stored in specific cells. They can enter and read data, recalculate specific cells or convert values into formatted labels:

{BLANK}

Erases a cell or cells.

{CONTENTS}

Copies the contents of one cell to another as a formatted label.

{GETDIRECTORYCONTENTS}

Enters into specified cells an alphabetized list of files in a specified directory.

{GETWINDOWLIST}

Lists open windows in specified cells.

{LET}

Places a number or string in the given location.

{NAVIGATE.SelectTable}

Expands selection of table boundaries.

{NAVIGATE.Zoom2Fit}

Zooms a table so that it fits in the visible part of the screen.

{NAVIGATE.GoTo}

Navigates to the sides or corners of a table.

{NAVIGATE.Jump}

Jumps to the next table in a given direction, or to the current table boundary if currently within a table.

{PUT}

Places a number or string in a given location offset by the specified number of columns and rows.

{PUTBLOCK}

Stores a value in each cell of specified cells.

{PUTBLOCK2}

Stores Data in each cell of Block; same as {PUTBLOCK} except it parses date formats and requires a formula prefix before values.

{PUTCELL}

Stores the specified data in the active cell.

{PUTCELL2}

Stores the specified data in the active cell; same as {PUTCELL} except it parses date formats and requires a formula prefix before values.

{RECALC}

Recalculates formulas in the specified location in rowwise order for a specified number of times, or until a specified condition is reached.

{RECALCCOL}

Recalculates formulas in the specified location in columnwise order for a specified number of times, or until a specified condition is reached.

{SPEEDFILL}

Fills the selected cells with sequential data.

{SPEEDFORMAT}

Applies a standard format to the selected cells.

{SPEEDFORMAT.Add}

Adds a new format based on a specified cells.

{SPEEDFORMAT.Remove}

Removes a format.

{SPEEDSUM}

Sums filled cells in the specified cells and writes results in adjacent empty cells (right/bottom).

Related Topics


Interactive Macro Commands

Interactive commands let you create macros that accept users' input. These commands can display dialog boxes and pop-up menus, pause the macro and request input, and prevent users from breaking out of the macro during a crucial period:

{ ? }

Pauses the macro and accepts input from the keyboard until you press Enter.

{ACTIVATE}

Makes the specified window active.

{BREAKOFF}

Disables the Ctrl+Break key used to cancel a macro.

{BREAKON}

Restores the Ctrl+Break key disabled by {BREAKOFF}.

{CHOOSE}

Displays a pick list of open windows.

{DODIALOG}

Displays the specified dialog box.

{GET}

Pauses the macro, accepts one keystroke and stores it in the specified location.

{GETLABEL}

Pauses the macro, displays a specified prompt, and stores the subsequent keystrokes as a label in the specified location.

{GETNUMBER}

Pauses the macro, displays the specified prompt, and stores the subsequent keystrokes as a numeric value in the specified location.

{GOTO}

Moves the selector to a specified location.

{GRAPHCHAR}

Stores the character a user presses to leave a chart or message in the specified location.

{IFKEY}

Returns true if the specified string is the macro name for any key macro command.

{LOOK}

Places the first keystroke typed in the specified location.

{MENUBRANCH}

Passes macro control to a custom menu at the specified location.

{MENUCALL}

Pauses the macro, and runs a customized menu as a subroutine.

{MESSAGE}

Displays contents of the specified cells in a pop-up window for the specified time.

{PAUSEMACRO}

Pauses the macro for dialog box entries, then resumes the macro when the user closes the dialog box.

{STEPOFF}

Exits Debug mode, executing the macro at normal pace.

{STEPON}

Enters Debug mode, in which Corel Quattro Pro runs the macro step by step, advancing when you press the spacebar.

{UNDO}

"Takes back" the last command; cancels its effects.

{WAIT}

Pauses the macro until the specified time arrives.

{WINDOW}

Makes the next pane active.

{WINDOW}

Makes the specified window active.

Related Topics


Program Flow Macro Commands

Program flow commands let you branch and loop in a macro. Use these commands to create macros that behave differently based on logical decisions, to break down complicated macros, or to consolidate repetitious macros into subroutines:

{BRANCH}

Passes execution control to another macro at the specified location.

{DEFINE}

Defines the type of arguments passed to a subroutine and tells where to store them.

{DISPATCH}

Branches indirectly to an alternate macro branch.

{FOR}

Runs a subroutine the specified number of times.

{FORBREAK}

Terminates execution of a {FOR} command.

{IF}

Checks to see if a condition is TRUE or FALSE before continuing execution.

{IFAUTOOBJ}

Checks to see if ObjectExpression is TRUE or FALSE before continuing execution; like {IF}, but results in an OLE automation object.

{ONERROR}

Continues execution at a specified location after Corel Quattro Pro detects an error.

{QUIT}

Terminates macro execution and returns keyboard control.

{RESTART}

Changes the current subroutine to the starting or main routine.

{RETURN}

Terminates the current subroutine and returns control to main routine.

{Subroutine}

Calls the specified subroutine, and passes any given arguments.

Related Topics


File Macro Commands

File macro commands work with data in files other than the active notebook. These commands can open files and read their data character by character, or create custom data files. If a file command succeeds, the macro command in the next cell is run, ignoring any other commands in the same cell as the file command. Commands in the same cell as the file command run only if the file command fails. Use this feature to trap errors such as the disk being full or reading data past the end of the file:

{ANSIREAD}

Reads the specified number of bytes and stores them in the specified location, without any character mapping.

{ANSIREADLN}

Reads a line of characters and stores it in the specified location, without any character mapping.

{ANSIWRITE}

Writes a string of characters to the current file, without any character mapping.

{ANSIWRITELN}

Writes a string of characters to the current file and ends it with a carriage return/linefeed, without any character mapping.

{CLOSE}

Closes a file opened by {OPEN}.

{FILESIZE}

Calculates the number of bytes in the current file, and stores the value in the specified location.

{GETPOS}

Places the position of the file pointer in the specified location.

{OPEN}

Opens a file for reading, writing, modifying, or appending.

{READ}

Reads the specified number of bytes and stores them in the specified location.

{READLN}

Reads a line of characters and stores it in the specified location.

{SETPOS}

Sets the file pointer to the specified byte position in a file.

{WRITE}

Writes a string of characters to the current file.

{WRITELN}

Writes a string of characters to the current file and ends it with a carriage return/linefeed.

Related Topics


OLE and DDE Macro Commands

OLE and DDE macro commands communicate with other Windows applications:

{ASSIGN}

Assigns a value to a variable.

{DELVAR}

Deletes the specified named variable and frees any object assigned to that variable.

{EXEC}

Runs the specified application.

{EXECAUTO}

Evaluates one or more automation expressions, but drops any returned values from expressions.

{EXECUTE}

Runs the specified macro in a server application.

{IFAUTOOBJ}

Checks to see if ObjectExpression is TRUE or FALSE before continuing execution; like {IF}, but results in an OLE automation object.

{INITIATE}

Initiates a conversation with a DDE application.

{POKE}

Sends data to a DDE application.

{REQUEST}

Requests data from a DDE application.

{SETLCID}

Specifies a locale ID for automation expressions.

{TERMINATE}

Ends a DDE conversation.

Related Topics


UI Building Macro Commands

UI building commands can add or remove menu commands from the active menu bar:

{ADDMENU}

Adds a menu to the menu system at a specified location.

{ADDMENUITEM}

Adds a menu command to the menu system at a specified location.

{ADDSUBMENUITEM}

Adds a menu command to the menu system at a specified location and makes the command at that location a menu.

{DELETEMENU}

Deletes a menu from the active menu system.

{DELETEMENUITEM}

Deletes a menu item from the active menu system.

{SETMENUBAR}

Sets the active menu system.

Related Topics


Object Macro Commands

Object commands let you move and resize objects on the Objects sheet either in a chart window, in a notebook window, or in a dialog window. These commands can also create objects or change the property settings of Corel Quattro Pro objects. Object commands can affect objects in any Corel Quattro Pro window.

{ADDSERIES}

Adds a data series to a floating chart.

{COLUMNWIDTH}

Sets the width of columns in the specified cells.

{CREATEOBJECT}

Creates chart or dialog objects.

{DUPLICATE}

Duplicates selected chart annotations or dialog box controls.

{FLOATCOPY}

Copies a floating object in the active notebook window.

{FLOATCREATE}

Creates a floating chart, SpeedButton, or drawn object.

{FLOATMOVE}

Moves a floating object in the active notebook window

{FLOATSIZE}

Resizes a selected floating object in the active notebook window.

{FLOATTEXT}

Replaces the string in the selected floating text box with the specified string.

{GETOBJECTPROPERTY}

Gets property setting from an object.

{GETPROPERTY}

Gets property setting from the object currently selected.

{MOVETO}

Moves selected objects to coordinates x, y

{RESIZE}

Resizes selected objects in the active window.

{ROWCOLSHOW}

Shows or hides rows or columns in the specified cells.

{ROWHEIGHT}

Sets the height of rows in the specified cells.

{SELECTBLOCK}

Selects a contiguous or noncontiguous selection within the active notebook.

{SELECTFLOAT}

Selects floating objects in the active notebook window using their object names.

{SELECTOBJECT}

Selects objects in active window.

{SETGRAPHATTR}

Equivalent to setting Chart Setup and Background properties (colors are comma-separated RGB triplets in quotes).

{SETOBJECTPROPERTY}

Sets properties of objects.

{SETPROPERTY}

Sets properties of selected object.

Related Topics


Miscellaneous Macro Commands

These commands insert characters, comments, and perform a variety of other tasks. The slide commands at the end of the list are used to build and run slide shows:

} or { } }

Inserts a right brace, }

{ { }

Inserts a left brace, {

{ ~ }

Inserts a tilde, ~

{ } (blank)

Does nothing; lets you reserve space in a macro without stopping macro execution.

{ ; } (semicolon)

Lets you enter explanatory remarks in a macro.

{HLINE}

Scrolls window horizontally the specified number of lines.

{HPAGE}

Scrolls window horizontally the specified number of pages.

{VLINE}

Scrolls window vertically the specified number of lines.

{VPAGE}

Scrolls window vertically the specified number of pages.

For slide show commands, see {Slide.Option}.

Related Topics


Command Equivalent Macros

Use the following command equivalent macros in place of menu commands. When used with @COMMAND, they return current command settings.

{Align.Option}

Equivalent to Format [image] Align.

{AnalysisExpert}

Equivalent to Tools [image] Numeric Tools [image] Analysis.

{Application.Property}

Equivalent to Tools [image] Settings.

{BlockCopy}

Equivalent to Edit [image] Copy Cells.

{BlockDelete.Option}

Equivalent to Edit [image] Delete.

{BlockFill.Option}

Equivalent to Edit [image] Fill [image] Fill Series.

{BlockInsert.Option}

Equivalent to Insert [image] Cells.

{BlockMovePages}

Equivalent to Edit [image] Move Sheets.

{BlockName.Option}

Equivalent to Insert [image] Cell Names.

{BlockReformat}

Equivalent to Format [image] Text Reformat.

{BlockTranspose}

Equivalent to Tools [image] Numeric Tools [image] Transpose.

{BlockValues}

Equivalent to Edit [image] Convert to Values.

{BudgetExpert}

Equivalent to Tools [image] Numeric Tools [image] Budget.

{ChartExpert}

Equivalent to Insert [image] Chart.

{ClearContents}

Equivalent to Edit [image] Clear [image] Values.

{ClearFormats}

Equivalent to Edit [image] Clear [image] Formats.

{ComposeFormula}

Equivalent to clicking [image].

{Consolidate.Option}

Equivalent to Tools [image] Consolidate [image] Edit.

{ConsolidateExpert}

Equivalent to Tools [image] Consolidate [image] New.

{Controls.Option}

Equivalent to Format [image] Object Order.

{DbAlias}

Equivalent to Insert [image] External Data [image] Aliases.

{DialogView}

Equivalent to Tools [image] Macro [image] Dialog Designer.

{DialogWindow.Property}

Equivalent to right-clicking the title bar of a custom dialog window.

{EditClear}

Equivalent to Edit [image] Clear.

{EditCopy}

Equivalent to Edit [image] Copy.

{EditCut}

Equivalent to Edit [image] Cut.

{EditGoto}

Equivalent to Edit [image] Go To.

{EditPaste}

Equivalent to Edit [image] Paste.

{ExportGraphic}

Equivalent to Chart [image] Export to File.

{FileClose}

Equivalent to File [image] Close.

{FileCloseAll}

No equivalent command.

{FileCombine}

Equivalent to Tools [image] Data Tools [image] Combine Files.

{FileExit}

Equivalent to File [image] Exit.

{FileExtract}

Equivalent to Tools [image] Data Tools [image]  Extract to File.

{FileImport}

Equivalent to Tools [image] Data Tools [image] QuickColumns.

{FileNew}

Equivalent to File [image] New.

{FileOpen}

Equivalent to File [image] Open.

{FileRetrieve}

No equivalent command.

{FileSave}

Equivalent to File [image] Save.

{FileSaveAll}

No equivalent command.

{FileSaveAs}

Equivalent to File [image] Save As.

{FileSend}

Equivalent to File [image] Send To [image] Mail.

{FloatOrder.Option}

Equivalent to Format [image] Object Order.

{Frequency.Option}

Equivalent to Tools [image] Numeric Tools [image] Frequency.

{GraphCopy}

Equivalent to Edit [image] Paste Special.

{GraphDeactivate}

No equivalent command.

{GraphDelete}

Equivalent to Chart [image] Delete Chart.

{GraphEdit}

Equivalent to right-clicking and clicking Edit Chart.

{GraphGallery}

Equivalent to Chart [image] Gallery.

{GraphNew}

Equivalent to Chart [image] New Chart.

{GraphSettings.Titles}

Equivalent to Chart [image] Titles.

{GraphSettings.Type}

Equivalent to Chart [image] Type/Layout.

{GraphView}

Equivalent to Chart [image] View Chart.

{GraphWindow.Property}

Equivalent to right-clicking the title bar of a chart window.

{Group.Option}

Equivalent to Insert [image] Name [image] Groups of Sheets.

{GroupObjects}

Equivalent to Format [image] Group.

{ImportGraphic}

Equivalent to Insert [image] Graphics [image] Clipart.

{InsertBreak}

Equivalent to Insert [image] Page Break.

{InsertObject}

Equivalent to Insert [image] Object.

{Invert.Option}

Equivalent to Tools [image] Numeric Tools [image] Invert.

{Links.Option}

Equivalent to Edit [image] Links.

{MapExpert}

Equivalent to Insert [image] Graphics [image] Map.

{Multiply.Option}

Equivalent to Tools [image] Numeric Tools [image] Multiply.

{NamedStyle.Option}

Equivalent to Format [image] Styles.

{Notebook.Property}

Equivalent to Format [image] Notebook.

{Notebook.Summary.Option}

Equivalent to File [image] Properties.

{ObjectsPageGoto}

Equivalent to View [image] Objects Sheet.

{OLE.Option}

Equivalent to right-clicking an OLE object and clicking the Property command.

{Optimizer.Option}

Equivalent to Tools [image] Numeric Tools [image] Optimizer.

{Order.Option}

Equivalent to Format [image] Object Order.

{Page.Property}

Equivalent to Format [image] Sheet.

{Parse.Option}

Equivalent to Tools [image] Data Tools [image] QuickColumns.

{PasteFormat}

Equivalent to Edit [image] Paste Special.

{PasteLink}

Equivalent to Edit [image] Paste Special.

{PasteSpecial}

Equivalent to Edit [image] Paste Special.

{PlayPerfectScript}

Equivalent to Tools [image] Macro [image] Play.

{Preview}

Equivalent to File [image] Print Preview.

{Print.Option}

Equivalent to File [image] Page Setup.

{PrinterSetup}

Equivalent to File [image] Print, then specifying a printer.

{Query.Option}

Equivalent to Tools [image] Data Tools [image] Notebook Query.

{Regression.Option}

Equivalent to Tools [image] Numeric Tools [image] Regression.

{ResizeToSame}

Equivalent to Format [image] ResizeToSame.

{RestrictInput.Option}

No equivalent command.

{Scenario.Option}

Equivalent to Tools [image] Scenario [image] Edit.

{ScenarioExpert}

Equivalent to Tools [image] Scenario [image] New.

{Search.Option}

Equivalent to Edit [image] Find And Replace.

{SelectAll}

Equivalent to Edit [image] Select All.

{Series.Option}

Equivalent to Chart [image] Series.

{SeriesManager.Option}

Equivalent to Edit [image] Define QuickFill; Series.

{Slide.Run}

Equivalent to Slides [image] Play Slide Show.

{SlideShowExpert}

Equivalent to Tools [image] Slide Show [image] New.

{SolveFor.Option}

Equivalent to Tools [image] Numeric Tools [image] Solve For.

{Sort.Option}

Equivalent to Tools [image] Sort.

{TableQuery.Option}

Equivalent to Insert [image] External Data [image] Table Query.

{TableLink.Option}

Equivalent to Insert [image] External Data [image] Table Link.

{TableView}

Equivalent to Insert [image] External Data [image] Database Desktop.

{Toolbar.Option}

Equivalent to View [image] Toolbars.

{UngroupObjects}

Equivalent to Format [image] Ungroup.

{WhatIf.Option}

Equivalent to Tools [image] Numeric Tools [image] What-If.

{WhatIfExpert}

Equivalent to Tools [image] Numeric Tools [image] What-If.

{WindowArrIcon}

Equivalent to Window [image] Arrange Icons.

{WindowCascade}

Equivalent to Window [image] Cascade.

{WindowClose}

Equivalent to Control Menu [image] Close.

{WindowHide}

Equivalent to Window [image] Hide.

{WindowMaximize}

Equivalent to Control Menu [image] Maximize.

{WindowMinimize}

Equivalent to Control Menu [image] Minimize.

{WindowMove}

Equivalent to Control Menu [image] Move.

{WindowNewView}

Equivalent to Window [image] New View.

{WindowNext}

Equivalent to Control Menu [image] Next.

{WindowPanes}

Equivalent to View [image] Split Window.

{WindowQPW.Option}

Equivalent to Corel Quattro Pro Control Menu.

{WindowRestore}

Equivalent to Control Menu [image] Restore.

{WindowShow}

Equivalent to Window [image] Show.

{WindowSize}

Equivalent to Control Menu [image] Size.

{WindowTile}

Equivalent to Window [image] Tile.

{WindowTitles}

Equivalent to View [image] Locked Titles.

{WorkSpace.Option}

Equivalent to File [image] Workspace.

Related Topics


Analysis Tools Macro Commands

Analysis Tools commands let you perform analyses of numerical data. They are equivalent to the tools available when you choose Tools [image] Numeric Tools [image] Analysis.

{ANOVA1}

One-way analysis of variance.

{ANOVA2}

Two-way analysis of variance with replication.

{ANOVA3}

Two-way analysis of variance without replication.

{DESCR}

Creates a table of descriptive statistics that characterize one or more samples.

{EXPON}

Exponentially smooths a series of values.

{FOURIER}

Performs a fast Fourier transformation on cells of data.

{FTESTV}

Performs a two-sample F-Test to compare population variances.

{HISTOGRAM}

Calculates the probability and cumulative distributions for a sample based on a series of bins.

{MCORREL}

Returns the correlation matrix between two or more data sets.

{MCOVAR}

Returns the covariance matrix between two or more data sets.

{MOVEAVG}

Returns a moving average for the values in a sample.

{MTGAMT}

Generates an amortization schedule for a mortgage.

{MTGREFI}

Generates a table of information relating to refinancing a mortgage.

{PTTESTM}

Performs a paired two-sample Student's t-Test for means.

{PTTESTV}

Performs a Student's t-Test using two independent samples with unequal variances.

{RANDOM}

Returns random values from a specified distribution.

{RANKPERC}

Computes the ordinal and percent rank of each value in a sample.

{REGRESS}

Performs multiple linear regression analysis.

{SAMPLE}

Returns a periodic or random sample of values from cells.

{TTESTM}

Performs a Student's t-Test using two independent samples with equal variances.

{ZTESTM}

Performs a two-sample z-Test for means, assuming known variances for each sample.

Related Topics


Quattro Pro DOS compatible commands
Corel Quattro Pro DOS Compatible Commands

This command or menu equivalent is provided for compatibility with the DOS version of Corel Quattro Pro. To learn more about it, see the Corel Quattro Pro for DOS @Functions and Macros guide.

Related Topics


Corel QuattroPro Macro Command List

{ }

{;}

?

A

ABS

ACTIVATE

ADDMENU

ADDMENUITEM

ADDSERIES

AddSubMenuItem

Alert

Align.Option

ALT

AnalysisExpert

ANOVA1

ANOVA2

ANOVA3

ANSIREAD

ANSIREADLN

ANSIWRITE

ANSIWRITELN

Application.Property

ASSIGN

Audit.Remove_All_Arrows

Audit.Trace_Dependents

Audit.Trace_Precedents

B

BACKSPACE

BACKTAB

BEEP

BIGLEFT

BIGRIGHT

BLANK

BlockCopy

BlockDelete.Option

BlockFill.Option

BlockInsert.Option

BlockMovePages

BlockName.Option

BlockReformat

BlockTranspose

BlockValues

BRANCH

BREAK

BREAKOFF

BREAKON

BS

BudgetExpert

C

CALC

CAPOFF

CAPON

ChartExpert

CHOOSE

CLEAR

ClearComments

ClearContents

ClearFormats

CLOSE

COLUMNWIDTH

Comment.Edit

Comment.EditURL

ComposeFormula

Consolidate.Option

ConsolidateExpert

CONTENTS

Controls.Option

CR

CREATEOBJECT

CrossTab

CTRL

D

D

DatabaseQuery

DATE

DbAlias

DEFINE

DEL

DELETE

DELETEMENU

DELETEMENUITEM

DELVAR

DESCR

DialogView

DialogWindow.Property

DISPATCH

DLL

DLL.Load

DODIALOG

DOWN

DraftViewGoto

DUPLICATE

E

EDIT

EditClear

EditCopy

EditCut

EditGoto

EditPaste

END

ESC

ESCAPE

EXEC

EXECAUTO

EXECUTE

EXPON

ExportGraphic

F

FileClose

FileCloseAll

FileCombine

FileExit

FileExtract

FileImport

FileNew

FileOpen

FileRetrieve

FileSave

FileSaveAll

FileSaveAs

FileSend

FILESIZE

FileVersion.Retrieve

FileVersion.Retrieve_Current

FileVersionSave

FLOATCOPY

FLOATCREATE

FLOATMOVE

FloatOrder.Option

FLOATSIZE

FLOATTEXT

FOR

FORBREAK

FOURIER

Frequency.Option

FTESTV

FUNCTIONS

G

GET

GETDIRECTORYCONTENTS

GETLABEL

GETNUMBER

GETOBJECTPROPERTY

GETPOS

GETPROPERTY

GETWINDOWLIST

GOTO

GRAPH

GRAPHCHAR

GraphCopy

GraphDeactivate

GraphDelete

GraphEdit

GraphGallery

GraphNew

GraphSettings.Titles

GraphSettings.Type

GraphView

GraphWindow.Property

Group.Option

GroupObjects

H

HELP

HISTOGRAM

HLINE

HOME

HPAGE

I

IF

IFAUTOOBJ

IFKEY

IMFORMAT

ImportGraphic

INDICATE

INITIATE

INS

INSERT

InsertObject

InsertPageBreak.Option

INSOFF

INSON

INSPECT

Invert.Option

J

No macros.

K

No macros.

L

L

LEFT

LET

Link

Links.Option

LOOK

M

MACROS

MapExpert

MapNew

MARK

MCORREL

MCOVAR

MENU

MENUBRANCH

MENUCALL

MESSAGE

MOVEAVG

MOVETO

MTGAMT

MTGREFI

Multiply.Option

N

NAME

NamedStyle.Option

NAVIGATE.Option

NEXTPANE

NEXTTOPWIN

NEXTWIN

Notebook.Property

Notebook.Summary.Option

Notebook.System

Notebook.Zoom_Factor

NUMOFF

NUMON

O

OBJECTSPAGEGOTO

OLE.Option

ONERROR

OnlineService

OPEN

Optimizer.Option

Order.Option

Outline.Option

P

Page.Property

PageViewGoto

PANELOFF

PANELON

ParseExpert.Option

Parse.Option

PasteFormat

PasteLink

PasteSpecial

PAUSEMACRO

PGDN

PGUP

PlayPerfectScript

POKE

Preview

Print.Option

PTTESTM

PTTESTV

PUT

PUTBLOCK

PUTBLOCK2

PUTCELL

PUTCELL2

Q

QGOTO

QUERY

Query.Option

QuickCorrect

QuickFilter.Go

QuickFilter.Toggle

QuickFilter.TopGo

QUIT

R

R

RANDOM

RANKPERC

READ

READLN

RECALC

RECALCCOL

RefreshScreenOn

RefreshScreenOff

REGRESS

Regression.Option

REQUEST

RESIZE

ResizeToSame

RESTART

RestrictInput.Option

RETURN

RIGHT

ROWCOLSHOW

ROWHEIGHT

S

SAMPLE

Scenario.Option

ScenarioExpert

SCROLLOFF

SCROLLON

Search.Option

SelectAll

SELECTBLOCK

SELECTFLOAT

SELECTOBJECT

Series.Option

SeriesManager.Option

SETGRAPHATTR

SETLCID

SETMENUBAR

SETOBJECTPROPERTY

SETPOS

SETPROPERTY

SHIFT

Slide.Option

SlideShowExpert

SolveFor.Option

Sort.Option

SPEEDFILL

SPEEDFORMAT

SPEEDFORMAT.Option

SPEEDSUM

STEP

STEPOFF

STEPON

Subroutine

T

TAB

TabControl.Option

TABLE

TableLink.Option

TableQuery.Option

TableView

TemplateTB.Option

TERMINATE

Toolbar.Option

TTESTM

U

U

UNDO

UngroupObjects

UP

V

VLINE

VPAGE

W

WAIT

WaitCursorOn

WaitCursorOff

WhatIf.Option

WhatIfExpert

WINDOW

WindowArrIcon

WindowCascade

WindowClose

WindowHide

WindowMaximize

WindowMinimize

WindowMove

WindowNewView

WindowNext

WindowPanes

WindowQPW.Option

WindowRestore

WindowShow

WindowSize

WINDOWSOFF

WINDOWSON

WindowTile

WindowTile.TopToBottom

WindowTitles

WorkSpace.Option

WRITE

WRITELN

X

No macros.

Y

No macros.

Z

ZOOM

ZTESTM


Corel QuattroPro Macro Commands by Category List
Corel QuattroPro Macro Command by Category List

Keyboard Macro Commands

Screen Macro Commands

Interactive Macro Commands

Program Flow Macro Commands

Cell Macro Commands

File Macro Commands

Command Equivalents

OLE and DDE Macro Commands

UI Building Macro Commands

Object Macro Commands

Analysis Tools Macro Commands

Miscellaneous Macro Commands